Code::Blocks Forums

User forums => Help => Topic started by: adorlith on October 03, 2005, 11:30:20 am

Title: undefined reference compiling CVS C::B
Post by: adorlith on October 03, 2005, 11:30:20 am
Hi guys,

Firstly, I want to congratulate you for the great job you're doing here.
Secondly, I encountered a problem while compiling (linking) CVS C::B, the linker complains about some undefined references:

Linking dynamic library: devel\wxscintilla.dll
Creating library file: devel\libwxscintilla.a
.objs\sdk\wxscintilla\src\ScintillaWX.o(.text+0x209d): In function `ZN11ScintillaWX17UpdateSystemCaretEv':
D:/Work/codeblocks/src/sdk/wxscintilla/src/ScintillaWX.cpp:542: undefined reference to `SetCaretPos@8'
.objs\sdk\wxscintilla\src\ScintillaWX.o(.text+0x21c7): In function `ZN11ScintillaWX17CreateSystemCaretEv':
D:/Work/codeblocks/src/sdk/wxscintilla/src/ScintillaWX.cpp:576: undefined reference to `CreateBitmap@20'
.objs\sdk\wxscintilla\src\ScintillaWX.o(.text+0x2223):D:/Work/codeblocks/src/sdk/wxscintilla/src/ScintillaWX.cpp:580: undefined reference to `CreateCaret@16'
.objs\sdk\wxscintilla\src\ScintillaWX.o(.text+0x2242):D:/Work/codeblocks/src/sdk/wxscintilla/src/ScintillaWX.cpp:581: undefined reference to `ShowCaret@4'
......................................................................................................................................................................

I'm not that much into Windoes programming, but I presume that I have to link against some system libraries, isn't it ? But I don't know how :(

OS: WindowsXP
mingw gcc 3.4.4
wxWidgets 2.6.1
C::B CVS Head

Thanks
Title: Re: undefined reference compiling CVS C::B
Post by: mandrav on October 03, 2005, 12:41:11 pm
Which project file are you using?
Go to "Project->Build options->[select scintilla in the tree]->Linker", click "Add" and type "gdi32" (w/out quotes).
Title: Re: undefined reference compiling CVS C::B
Post by: adorlith on October 03, 2005, 04:18:35 pm
  I don't know for what reason "Project -> Open Projects -> CodeBlocks-wx2.6.0.cbp" doesn't work for me, so I used CodeBlocks.cbp. That's why I had these erorrs (and others too).

6 hours later:
The Code::Block is up and running !!!

Notes:
I had hard times finding an archiving command line program to accept -j9 switch.
I can load CodeBlocks-wx2.6.0.cbp with the newly compiled Code::Blocks.