vs2008的链接问题

koly_j 2010-08-05 12:21:02
写了个程序,加了个/verbose:lib,查看链接库的过程,然后就出现了下面的信息:
Searching libraries
Searching mfc42.lib:
Searching mfcs42.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching Encrypt.lib:
Searching cv200.lib:
Searching cxcore200.lib:
Searching highgui200.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comctl32.lib:
Searching mfc42.lib:
Searching mfcs42.lib:
mfcs42.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching Encrypt.lib:
Searching cv200.lib:
Searching cxcore200.lib:
Searching highgui200.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comctl32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\olepro32.lib:
Searching mfc42.lib:
Searching mfcs42.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching Encrypt.lib:
Searching cv200.lib:
Searching cxcore200.lib:
Searching highgui200.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comctl32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\olepro32.lib:
Finished searching libraries
Creating library D:\programs\shadow\Release\shadow.lib and object D:\programs\shadow\Release\shadow.exp
Searching libraries
Searching mfc42.lib:
Searching mfcs42.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching Encrypt.lib:
Searching cv200.lib:
Searching cxcore200.lib:
Searching highgui200.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comctl32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\olepro32.lib:
Finished searching libraries
D:\programs\shadow\Release\shadow.dll : fatal error LNK1169: one or more multiply defined symbols found



问题是:为什么很多库都searching了两次呢??

提前谢谢啦
...全文
77 点赞 收藏 8
写回复
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
koly_j 2010-11-05

没有错误,只是对search的库的顺序不解,为什么有些库要search两次

[Quote=引用 7 楼 visualeleven 的回复:]

引用 4 楼 koly_j 的回复:
一个最简单的hello world 程序,哪位大侠能够解释下编译内容:
code:
#include <iostream>
int main()
{
std::cout << "hello world!" << std::endl;
return 0;
}
编译情况:
------ Build started: Project: Test……
[/Quote]
回复
Eleven 2010-08-06
[Quote=引用 4 楼 koly_j 的回复:]
一个最简单的hello world 程序,哪位大侠能够解释下编译内容:
code:
#include <iostream>
int main()
{
std::cout << "hello world!" << std::endl;
return 0;
}
编译情况:
------ Build started: Project: TestLinkLibCv, Configurat……
[/Quote]
你就这个简单的程序?就出了这么多错误???
回复
关注。。。。
回复
koly_j 2010-08-05
一个最简单的hello world 程序,哪位大侠能够解释下编译内容:
code:
#include <iostream>
int main()
{
std::cout << "hello world!" << std::endl;
return 0;
}
编译情况:
------ Build started: Project: TestLinkLibCv, Configuration: Release Win32 ------
Compiling...
main.cpp
Linking...
Searching libraries
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Finished searching libraries
Generating code
Finished generating code
Searching libraries
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Finished searching libraries
Searching libraries
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib:
Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib:
Searching D:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
Finished searching libraries
Embedding manifest...
Build log was saved at "file://d:\programs\TestLinkLibCv\TestLinkLibCv\Release\BuildLog.htm"
TestLinkLibCv - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
回复
oyljerry 2010-08-05
不同的库可能都依赖了,所以多次search
回复
shihaojie1219 2010-08-05
不懂 关注
回复
发动态
发帖子
VC/MFC
创建于2007-09-28

1.5w+

社区成员

VC/MFC相关问题讨论
申请成为版主
社区公告
暂无公告