在Visual Studio 2012中,Librarian和Linker之间有什么区别? [英] In Visual Studio 2012 what is the difference between Librarian and Linker?

查看:161
本文介绍了在Visual Studio 2012中,Librarian和Linker之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的项目配置为使用x86和x64位,为了这样做,我不得不改变目标机器的不同配置。

I am configuring my Projects to build with x86 and x64 bits, in order to do that I had to change the Target Machine for the different Configurations.

我是试图找到在哪里设置目标机器为我的本机C + +库,我发现 this post

I was trying to find where to set the Target Machine for my Native C++ Libraries and I found this post.

但是我在Native C ++ Library项目中没有 Linker 属性 - > 链接器 - >高级 - >目标计算机选项。

However I don't have a Linker in the Native C++ Library projects, I have the "Configuration Properties -> Linker -> Advanced -> Target Machine" option in the C++/CLI projects only.

在Native C ++库项目中有一个库管理员部分。我搜索,我发现目标机器是:配置属性 - > 库管理员 - >常规 - >目标机器。

In the Native C++ Library projects I have a "Librarian" section. I searched and I found that the Target Machine is in: Configuration Properties -> Librarian -> General -> Target Machine.

似乎有更少的选项比链接器。

The Librarian section seems to have less options than Linker.

图书馆员链接器部分是否相同?关于我在google上搜索的文档,我只看到链接器

Are the Librarian and the Linker section the same? On the documentation I searched on google I only see Linker mentioned.

也许我有配置错误?或者在此帖子中,答案没有引用本机C ++?

Maybe I have something configured wrong? Or in this post the answer didn't refer to Native C++?

推荐答案


库管理员和链接器部分是否相同?关于我在google上搜索的文档我只看到链接提到。

Are the Librarian and the Linker section the same? On the documentation I searched on google I only see Linker mentioned.

他们几乎是一样的。当你的项目是一个静态库时,库管理器被启用。链接器用于可执行文件和动态库(dll)。

They are almost the same. Librarian is enabled when your project is going to be a static lib. Linker is for executables and dynamic libraries (dll).

动态库将动态链接到你正在构建的excecutable,这意味着dll必须在执行时,静态库将是可执行文件的一部分。静态库不能链接到某些动态库,因为链接应该在生成可执行文件时完成,除非它会引起歧义。这就是为什么图书馆员选项减少。 (例如,没有输入选项)。

While dynamic libraries will be linked dynamic to the excecutable your are building, which means the dll have to be around while executing, static libs will be part of the executable. Static libraries mustn't be linked to some dynamic lib, since the linking should be done while generating the executable, apart from that it would cause ambiguity. This is why the Librarian options are reduced. (e.g. there is no Input options).


也许我配置了错误?或者在此帖子中,答案没有引用本机C ++?

Maybe I have something configured wrong? Or in this post the answer didn't refer to Native C++?

他的项目生成一个dll,而不是一个静态的lib。请在配置属性 - >常规 - >配置类型中检查您的设置。

his project generates a dll, not a static lib. Check your settings in Configuration Properties -> General -> Configuration Type.

这篇关于在Visual Studio 2012中,Librarian和Linker之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆