inline vtable problems with latest kdelibs snapshot?
Friedrich W. H. Kossebau
Friedrich.W.H at kossebau.de
Tue May 9 18:35:45 BST 2006
Am Dienstag, 9. Mai 2006 19:33, schrieb Frans Englich:
> On Tuesday 09 May 2006 17:13, David Faure wrote:
> > 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/kebcdic1047charcode
> > >ck charcodeciftest.o: In function `KEBCDIC1047CharCodec':
> > > /home/koder/Programmieren/kdesvn/trunk/KDE/kdeutils/khexedit/lib/tests/
> > >.. /codecs/kebcdic1047charcodec.h:44: undefined reference to `vtable for
> > > KHE::KEBCDIC1047CharCodec'
> > > collect2: ld returned 1 exit status
> > > make: *** [khexedit/lib/tests/kebcdic1047charcodeckcharcodeciftest]
> > > Fehler 1
> > > make: ***
> > > [khexedit/lib/tests/CMakeFiles/kebcdic1047charcodeckcharcodeciftest.dir
> > >/a ll] 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)
Aha, thanks for the info :)
> > 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" ;)
> So if I got this straight: you suggest to export classes even if their only
> requirement for the export is testing? Can't it be done in a way such that
> exporting doesn't affect production? Seems to be a pity, otherwise.
Yes, it's the same problem for me here, testing internal classes.
I really hope there could be a way to use full libraries, like it used to be.
The other alternative would be to manually add the SUT files and all dependent
for each single test, which makes doing testing more inconvenient, which is
> I've myself run into this problem, so it will be interesting to see if
> anyone can come up with a solution.
The same setup worked with libtool (IIRC). Did it store the not exported
symbols somewhere so they were available if linking to the lib as a
I guess the trolls came across this problem, too? How did they solve it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel