inline vtable problems with latest kdelibs snapshot?

Thorsten Röder thorsten.roeder at weihenstephan.org
Tue May 9 19:01:19 BST 2006


 

> -----Original Message-----
> From: David Faure [mailto:faure at kde.org] 
> Sent: Tuesday, May 09, 2006 7:13 PM
> To: kde-core-devel at kde.org
> Subject: Re: inline vtable problems with latest kdelibs snapshot?
> 
> On Tuesday 09 May 2006 19:05, Friedrich W. H. Kossebau wrote:
> > Hi,
> > 
> > after I updated to the most new kdelibs snapshot some of 
> the test in 
> > kdeutils/khexedit/lib/tests do not link any longer, but 
> complain about 
> > undefined vtables, e.g.:
> > --- 8< ---
> > Linking CXX executable kebcdic1047charcodeckcharcodeciftest
> > 
> CMakeFiles/kebcdic1047charcodeckcharcodeciftest.dir/kebcdic104
> 7charcodeckcharcodeciftest.o: 
> > In function `KEBCDIC1047CharCodec':
> > 
> /home/koder/Programmieren/kdesvn/trunk/KDE/kdeutils/khexedit/l
> ib/tests/../codecs/kebcdic1047charcodec.h:44: 
> > undefined reference to `vtable for KHE::KEBCDIC1047CharCodec'
> > collect2: ld returned 1 exit status
> > make[2]: *** 
> [khexedit/lib/tests/kebcdic1047charcodeckcharcodeciftest] 
> > Fehler
> > 1
> > make[1]: ***
> > 
> [khexedit/lib/tests/CMakeFiles/kebcdic1047charcodeckcharcodeciftest.di
> > r/all]
> > Fehler 2
> > make: *** [all] Fehler 2
> > --- 8< ---
> > 
> > Any idea what could have triggered this? 
> 
> Yes, visibility is hidden by default again, on compilers that 
> support it (notably gcc-4.0) For your test to link, you need 
> the library it's linking with (libkhexedit or something) to 
> export the symbols that the test uses - best done using a 
> KHEXEDIT_EXPORT defined to KDE_EXPORT in a khexedit_export.h 
> file, so that people compiling on windows can later on alter 
> that header file to redefine the macro more precisely.
> Then insert KHEXEDIT_EXPORT between "class" and 
> "KEBCDIC1047CharCodec" ;)
> 

there seems to be an issue with gcc-Version 3.4.5.

At least kjsembed/kjscmd is not linking with kjsembed here atm. :(


Linking CXX executable ../../bin/kjscmd
CMakeFiles/kjscmd.dir/kjscmd.o: In function `printUsage(QString)':
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:38: undefined
reference to `KJSEmbed::conerr()'
CMakeFiles/kjscmd.dir/kjscmd.o: In function `main':
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:79: undefined
reference to `KJSEmbed::conout()'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:117: undefined
reference to `KJSEmbed::Engine::Engine()'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:121: undefined
reference to `KJSEmbed::Engine::interpreter() const'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:125: undefined
reference to `KJSEmbed::Engine::addObject(QObject*, KJS::UString const&)
const'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:132: undefined
reference to `KJSEmbed::Engine::runFile(KJS::UString const&)'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:136: undefined
reference to `KJSEmbed::Engine::runFile(KJS::UString const&)'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:141: undefined
reference to `KJSEmbed::Engine::completion() const'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:142: undefined
reference to `KJSEmbed::conerr()'
/data/home/kde/kdelibs4_snapshot/kjsembed/kjscmd/kjscmd.cpp:144: undefined
reference to `KJSEmbed::Engine::~Engine()'
collect2: ld returned 1 exit status
make[2]: *** [bin/kjscmd] Error 1
make[1]: *** [kjsembed/kjscmd/CMakeFiles/kjscmd.dir/all] Error 2
make: *** [all] Error 2


AFAIK the EXPORT macro setup on these functions in kjsembed/global.h is OK,
but looking at the libkjsembed the functions above are hidden.

What do you think? Is this an issue with gcc-3.4.5 or 
have I just overlooked something?

Thx
Regards,
Thorsten  






More information about the kde-core-devel mailing list