Author Topic: Linux Linker error in SVN HEAD (Rev. 1542)  (Read 5087 times)

Offline DanDanger

  • Single posting newcomer
  • *
  • Posts: 7
Linux Linker error in SVN HEAD (Rev. 1542)
« on: December 17, 2005, 11:24:52 pm »
System : Debian Unstable (GNU Linux)
wx-Version : wxWidgets 2.61 (unicode)  (and yes, wx-common IS installed ;-))
g++ Version : 4.0.3
CB-Version : SVN HEAD (rev. 1542)

Hi,
I encounter a linker-Error while trying to compile the current Code::Blocks SVN HEAD :
Code: [Select]
trunk/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxScintilla::FindText(int, int, wxString const&, int, int*)'
collect2: ld returned 1 exit status

Does anyone know how to solve this error !?

Thank's in advance
DanDanger


PS :
There is also a error in
"trunk/src/sdk/confimanager.h"  (Line 201)
Code: [Select]
if(TiXmlNode *n = ph.FirstChild(key).FirstChild("objmap").Node())

must be changed to :

if(TiXmlNode *n = ph.FirstChild(key.ToAscii()).FirstChild("objmap").Node())    // <-- key.ToAscii()
Otherwise, TinyXML is not able to compile in Unicode-Mode.

Greetings
DanDanger
« Last Edit: December 17, 2005, 11:26:24 pm by DanDanger »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #1 on: December 18, 2005, 01:55:19 pm »
Hi,
I encounter a linker-Error while trying to compile the current Code::Blocks SVN HEAD :
Code: [Select]
trunk/src/sdk/.libs/libcodeblocks.so: undefined reference to `wxScintilla::FindText(int, int, wxString const&, int, int*)'
collect2: ld returned 1 exit status

Does anyone know how to solve this error !?

Yes, manually delete sdk/sdk.h.gch. The precompiled header holds an older signature of this function.

PS :
There is also a error in
"trunk/src/sdk/confimanager.h"  (Line 201)
Code: [Select]
if(TiXmlNode *n = ph.FirstChild(key).FirstChild("objmap").Node())

must be changed to :

if(TiXmlNode *n = ph.FirstChild(key.ToAscii()).FirstChild("objmap").Node())    // <-- key.ToAscii()
Otherwise, TinyXML is not able to compile in Unicode-Mode.

Fixed.
Be patient!
This bug will be fixed soon...

Offline DanDanger

  • Single posting newcomer
  • *
  • Posts: 7
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #2 on: December 19, 2005, 01:49:03 am »
Hi,
Quote
Yes, manually delete sdk/sdk.h.gch. The precompiled header holds an older signature of this function.
unfortunately, this doesn't work ;-(

Every time I type 'make', the Pre-Compiled Header will be generated new.
So, i edited the Makefile in "src/sdk/Makefile"
Code: [Select]
"src/sdk/Makefile" (Line 268)
Changed :
#BUILT_SOURCES =
BUILT_SOURCES = $(srcdir)/sdk.h.gch

to :

BUILT_SOURCES =
#BUILT_SOURCES = $(srcdir)/sdk.h.gch
(apparently, i am not the only one with this Problem ;-) )

So, I typed 'make clean" and recompiled everything.
The "sdk.h.gch"-File is gone, however, the same linker-error is still there ;-(

I could not find any other Pre-Compiled headers in the "src/"-Directory, so i wonder
if something is wrong with the Makefiles... ?

Any suggestions ?

Greetings
DanDanger

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #3 on: December 19, 2005, 02:06:18 am »
Quote
unfortunately, this doesn't work ;-(

Every time I type 'make', the Pre-Compiled Header will be generated new.
Umm.... this is exactly what should happen. You should delete the precompiled header so it gets freshly compiled with the proper signatures.

Without the precompiled header alltogether, you might get the same error (and others in addition) because it is possible that we do not include everything that is needed in every file. Since we use precompiled headers by default, it is easy to miss one file.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline DanDanger

  • Single posting newcomer
  • *
  • Posts: 7
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #4 on: December 19, 2005, 02:25:03 am »
Hi,

well, the freshly compiled "Pre-Compiled header" is not working at all ;-(
Still, the same Linker-Error ;-(

Why is C::B so hard to compile ??

Greetings
DanDanger

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #5 on: December 19, 2005, 08:55:49 am »
Why is C::B so hard to compile ??

It's not hard. Have you tried a make clean; make? This function's signature hasn't changed since revision 1508...

Be patient!
This bug will be fixed soon...

Offline DanDanger

  • Single posting newcomer
  • *
  • Posts: 7
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #6 on: December 20, 2005, 04:59:10 am »
YEAH,

now It compiles :-)

After a "fresh" svn-checkout, you have to make a "make install" (as root)  in "trunk/src/sdk".
libwxscintilla.so gets copied into "/usr/lib/", and all linker Errors are gone :-)

Thank's to everyone who helped me :-)

Greetings
DanDanger

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Linux Linker error in SVN HEAD (Rev. 1542)
« Reply #7 on: December 20, 2005, 10:47:10 am »
Yes this happens with a number of libraries. The makefiles are looking for the installed versions of the shared libraries rather then the newly compiled ones. If I knew more about the build system I would have a go at fixing it...

Les