Code::Blocks Link Errors

Started by
6 comments, last by Dave Hunt 18 years, 7 months ago
Ok, I installed Code::Blocks compiler and I'm attempting to run it with the MVC Tool-kit 2003 compiler, I downloaded the Platform SDK and installed it, linked it as per the instructions on the Code::Blocks tutorial, and it is still having link errors such as: lipcpd.lib(_tolower.obj) error LNK2019: unresolved external symbol __malloc_dbg referenced in function _Getctype lipcpd.lib(xdebug.obj) error LNK2001: unresolved external symbol __malloc_dbg lipcpd.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) As for my settings in compile>compile options>Directories>Compiler: C:\Programs and Settings\Tyler Durden\My Documents\Visual Studio Projects\GLUT\glut-3.7.6\include C:\Program Files\Microsoft Visual C++ Toolkit 2003\include C:\Program Files\Microsoft Platform SDK\Include And compile>compile options>Directories>Linker: C:\Documents and Settings\Tyler Durden\My Documents\Visual Studio Projects\GLUT|glut-3.7.6\lib C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib C:\Program Files\Microsoft Platform SDK\Lib And compile>compile options>Directories>Resource compiler: C:\Documents and Settings\Tyler Durden\My Documents\Visual Studio Projects\GLUT\glut-3.7.6\include C:\Program Files\Microsoft Platform SDK\Include And I specified "C:\Program Files\Microsoft Platform SDK\Bin" under compile>compile options>Programs>Extra paths All of it looks correct, I can't figure out what I did wrong, and I'd like to have a compiler on my laptop without having to buy VS .Net license (since the terms of the college specify I may only install it on one machine, and I think there is a commercial use clause in there I'm not find of too) Any ideas? Anybody?
"Think you Disco Duck, think!" Professor Farnsworth
Advertisement
What lib files are you linking into the program?
No specific libraries, isn't linking to the directories enough? Which library should I link to for OpenGL? glut.lib?
"Think you Disco Duck, think!" Professor Farnsworth
You're not "linking to the directories." You're telling the linker where to find the library files. You still have to tell it which ones you want to link to. The errors you're getting aren't OpenGL/GLUT functions, they are the debug versions of malloc and free. IIRC, there were some libs missing from the toolkit, but I don't remember which ones.
Quote:Original post by Horatius83
As for my settings in compile>compile options>Directories>Compiler:
C:\Programs and Settings\Tyler Durden\My Documents\Visual Studio Projects\GLUT\glut-3.7.6\include
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include
C:\Program Files\Microsoft Platform SDK\Include


Sorry for going OT, but nice user name [cool].

______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Quote:Original post by Dave Hunt
You're not "linking to the directories." You're telling the linker where to find the library files. You still have to tell it which ones you want to link to. The errors you're getting aren't OpenGL/GLUT functions, they are the debug versions of malloc and free. IIRC, there were some libs missing from the toolkit, but I don't remember which ones.


To get the missing headers/libs you need to download the platform SDK for your architecture (x86 or x64).
Quote:
To get the missing headers/libs you need to download the platform SDK for your architecture (x86 or x64).


I did that, still nothing. It keeps linking to the debug library of libcp.lib (libcpd.lib), and when I link specifically to lipcp.lib it throws an error about certain functions already being defined (something about locale0). This is making saving up all my money to buy a MS .Net compiler seem attractive by comparison...

His name is Robert Pulson....
"Think you Disco Duck, think!" Professor Farnsworth
Quote:This is making saving up all my money to buy a MS .Net compiler seem attractive by comparison...


You can buy the MS VC++ .NET 2003 Standard for next to squat, then load the toolkit on top of that (just add the toolkit's bin directory in the config dialog), and you've got everything you need. The only caveat is that you have to manually specify the optimization command-line options for release mode, since the checkboxes aren't active.

This topic is closed to new replies.

Advertisement