vs链接选项/verbose 诊断链接问题

利用vs的编译器提供的/verbose选项,我们可以诊断链接问题,比如,在链接的时候搜索链接库的顺序,有哪些库被引入,哪些符号由哪个库来解析等等。

默认vs是没有打开这一选项的,要打开这一选项:

右键点击你的工程,然后属性(property),然后

linker->general->show progress

选择

Display All Progress Messages(/VERBOSE)

如图所示:

 

z这样就会列出很详细的链接信息:

1>—— Build started: Project: ipptest, Configuration: Debug Win32 ——
1>Linking…
1>Starting pass 1
1>Processed /DEFAULTLIB:msvcprtd
1>Processed /DEFAULTLIB:../release/stclib.lib
1>Processed /DEFAULTLIB:MSVCRTD
1>Processed /DEFAULTLIB:OLDNAMES
1>Searching libraries
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib\uuid.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib\msvcprtd.lib:
1>      Found "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct std::char_traits<char> > &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > std::cout" (__imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(newaop_s.obj)
1>      Found "__declspec(dllimport) public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (__imp_?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std@@QAEHH@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (__imp_?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: static int __cdecl std::char_traits<char>::eof(void)" (__imp_?eof@?$char_traits@D@std@@SAHXZ)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (__imp_?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (__imp_?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ)
1>        Referenced in main.obj
1>        Loaded msvcprtd.lib(MSVCP80D.dll)
1>      Found "__declspec(dllimport) public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (__imp_?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ)
1>        Referenced in main.obj

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

留言

你的邮箱是保密的 必填的信息用*表示