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了两次呢??

提前谢谢啦
...全文
93 8 打赏 收藏 举报
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
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

1.6w+

社区成员

VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
帖子事件
创建了帖子
2010-08-05 12:21
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……