Hi, I'm running under Windows Vista, and after I read some users were having trouble using GCC under Vista, I decided to download the VS 2005 Express compiler and give that a shot instead. After I downloaded VS 2005 Express, I downloaded and installed C::B, and configured it so that it used VS 2005 as the default compiler. I used the wizard to create a basic console application as a test, and this is what I got in my build log:
-------------- Build: Debug in Blah ---------------
Linking console executable: .\Blah.exe
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
libcpmtd.lib(cout.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDXZ)
libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype
.\Blah.exe : fatal error LNK1120: 4 unresolved externals
Process terminated with status 1120 (0 minutes, 0 seconds)
6 errors, 1 warnings
I tried the compiler's suggestion, and added "/NODEFAULTLIB:LIBCMT" to the linker's options, which produced this in the build log:
-------------- Build: Debug in Blah ---------------
Linking console executable: .\Blah.exe
libcpmtd.lib(xmutex.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
libcpmtd.lib(ios.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
libcpmtd.lib(iosptrs.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
main.obj : error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function "public: char * __cdecl std::_DebugHeapAllocator<char>::allocate(unsigned int,void const *)" (?allocate@?$_DebugHeapAllocator@D@std@@QAAPADIPBX@Z)
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
libcpmtd.lib(string.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
...and on and on and on...there about fifty errors it lists, but says there are more.
Any suggestions? Thanks.
Are you using VS 2005 with the latest SP?
MS normally releases patches to get everything working on the newest OS.
Edit: http://go.microsoft.com/?linkid=6366078
Tim S
Quote from: foahchon on March 10, 2007, 09:36:37 PM
I used the wizard to create a basic console application as a test, and this is what I got in my build log:
...
I tried the compiler's suggestion, and added "/NODEFAULTLIB:LIBCMT" to the linker's options, which produced this in the build log:...
Any suggestions? Thanks.
The compiler's suggestion is not a good one in this case. The correct fix is to open your project's Build options and, for the debug target, select the "Multi-threaded Debug Runtime Library [/MTd]" option near the bottom of the Compiler Flags list, and rebuild.
It would probably be a good idea for one of the devs with Visual C++ 2005 installed to go through and update all the wizards to make sure they work appropriately.
That did the trick. Thanks.
Quote from: TDragon on March 11, 2007, 12:55:46 AM
It would probably be a good idea for one of the devs with Visual C++ 2005 installed to go through and update all the wizards to make sure they work appropriately.
Console wizard has got problems with VC05. I had fixed this issue but wanted to make the wizard more interactive (regarding selection of runtime libraries) and I didn't commit that one. ;)
Anyway I'll put it today so that with next nightly this problem gets fixed.
Regards,
Biplab
MSVC 8 support has been improved for Console wizard and other improvements have been made to wizard. It's in revision 3683. :)