用vc6.0编译Qt4.1.0版本的C:\Qt\4.1.0\examples\tutorial\t1
编译器提示
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,clas
s std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,clas
s std::allocator<char> >(unsigned int,char)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ID@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_string<unsigned
short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(unsigned short const *)" (__imp_??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_string<unsigned
short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(unsigned int,unsigned short)" (__imp_??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IG@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall std::basic_istream<char,struct std::char_traits<char> >::_Ipfx(bool)" (__imp_?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@Q
AE_N_N@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (__imp_?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@
@@std@@QAEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@st
d@@QAEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@
Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (__imp_?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::_Lockit(int)" (__imp_??0_Lockit@std@@QAE@H@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (__imp_?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@Q
AEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall std::basic_istream<unsigned short,struct std::char_traits<unsigned short> >::_Ipfx(bool)" (__imp_?_Ipfx@?$basic_istream@GU?$char_t
raits@G@std@@@std@@QAE_N_N@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> >::_Unlock(void)" (__imp_?_Unlock@?$basic_streambuf@GU
?$char_traits@G@std@@@std@@QAEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> >::_Lock(void)" (__imp_?_Lock@?$basic_streambuf@GU?$ch
ar_traits@G@std@@@std@@QAEXXZ)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@
locale@2@@Z)
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::_Osfx(void)" (__imp_?_Osfx@?$basic_ostream@GU?$char_t
raits@G@std@@@std@@QAEXXZ)
Debug/qt.exe : fatal error LNK1120: 18 unresolved externals
Error executing link.exe.
我知道是运行库设置的有问题。默认是Debug Vsingle-Threaded,与msvcrtd.lib冲突,但是怎么解决呢?我试过在link项下的input项中ingore msvcrtd.lib还是没有用。我用VC.net 2003编译时选Debug Multithreaded DLL就可以。