Author Topic: Help Link Errors  (Read 5129 times)

Kalcyon

  • Guest
Help Link Errors
« on: June 19, 2009, 01:00:33 pm »
Code
||=== FA, Debug ===|
D:\Program Files\Microsoft Visual Studio 9.0\VC\include\xlocale|342|warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc|
LINK||warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library|
main.obj||error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "protected: virtual char const * __thiscall std::ctype<char>::_Do_widen_s(char const *,char const *,char *,unsigned int)const " (?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z)|
libcpmtd.lib(cin.obj)||error LNK2001: unresolved external symbol __CrtDbgReportW|
libcpmtd.lib(cout.obj)||error LNK2001: unresolved external symbol __CrtDbgReportW|
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|
bin\Debug\FA.exe||fatal error LNK1120: 4 unresolved externals|
||=== Build finished: 8 errors, 2 warnings ===|

whats wrong with it? ive tried uninstalling and reinstalling code blocks. All i have done is made a project and added a cpp file with the following...

Code
#include <iostream>

using namespace std;

int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Help Link Errors
« Reply #1 on: June 19, 2009, 08:50:38 pm »
Try building in release mode; Sometimes VS Express does not have the debug libraries.

Might try adding /NODEFAULTLIB to linker options.

Code
LINK||warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library|

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org