[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: another linking problem
From:       Stephan Kulow <coolo () kde ! org>
Date:       1999-12-14 17:27:26
[Download RAW message or body]

Lars Knoll wrote:
> 
> On Tue, 14 Dec 1999, Michael Reiher wrote:
> > Hi,
> >
> > I also have an linking problem, but it seems to be anotherone than
> > Reggies. When linking kdeui I get:
> >
> > gcc -shared  kthemestyle.lo kurllabel.lo knuminput.lo
> > kiconloaderdialog.lo ktablistbox.lo ktoolbar.lo klined.lo kprogress.lo
> > kimageeffect.lo kcolordlg.lo kselect.lo kdatepik.lo kdatetbl.lo
> > kfontdialog.lo kpopmenu.lo ktabctl.lo kstatusbar.lo ktmainwindow.lo
> > ktmlayout.lo kmenubar.lo kseparator.lo krestrictedline.lo kcontrol.lo
> > kcolorbtn.lo kapplet.lo kdockwindow.lo kbuttonbox.lo keditcl1.lo
> > keditcl2.lo ktoolboxmgr.lo kled.lo kdbtn.lo ktabbar.lo kwizard.lo
> > kcontainer.lo kkeydialog.lo kruler.lo kcursor.lo kaccelmenu.lo
> > klineeditdlg.lo kurlcompletion.lo kthemebase.lo kcharselect.lo
> > kcolordrag.lo qxembed.lo knumvalidator.lo kdialog.lo kdialogbase.lo
> > kjanuswidget.lo kaboutdialog.lo kpixmapeffect.lo kauthicon.lo
> > kmessagebox.lo kdualcolorbtn.lo ktoolbarradiogroup.lo ktoolbarbutton.lo
> > ktoolbaritem.lo ktextbrowser.lo kaction.lo khelpmenu.lo kcmodule.lo
> > kcmenumngr.lo panelmenu.lo kdockwindow.moc.lo kcmodule.moc.lo
> > -L/opt/kde-CVS/lib -L/home/michael/kde-cvs/kdelibs/dcop/.libs
> > -L/usr/local/qt-2.0/lib -L/usr/X11R6/lib ../kdecore/.libs/libkdecore.so
> > -lc  -Wl,-soname -Wl,libkdeui.so.3 -o .libs/libkdeui.so.3.0.0
> > ktoolbaritem.lo(.data+0x0): multiple definition of `QList<KToolBarItem>
> > virtual table'
> > ktoolbar.lo(.data+0x20): first defined here
> > ktoolbaritem.lo: In function `QList<KToolBarItem> type_info function':
> > ktoolbaritem.lo(.text+0x760): multiple definition of
> > `QList<KToolBarItem> type_info function'
> > ktoolbar.lo(.text+0x6060): first defined here
> > ktoolbaritem.lo: In function `QList<KToolBarItem>::count(void) const':
> > ktoolbaritem.lo(.text+0x650): multiple definition of
> > `QList<KToolBarItem>::count(void) const'
> > ktoolbar.lo(.text+0x5e70): first defined here
> > ktoolbaritem.lo: In function `QList<KToolBarItem>::clear(void)':
> > ktoolbaritem.lo(.text+0x710): multiple definition of
> > `QList<KToolBarItem>::clear(void)'
> >
> > and so on.
> >
> > Removing the line
> >
> > template class QList<KToolBarItem>;
> >
> > from ktoolbaritem.cpp fixes it. Coolo recently added the same line to
> > ktoolbar.cpp. And that seems to clash. What is it supposed to do, btw?
> > Is it save to remove it?
> 
> I already committed a fix.
> 
These lines add explicit template instantations. They reduce compile
time
and memory usage in the resulting binary when compiled with -frepo. They 
are ignored otherwise and can savly be removed til the next one tries to 
compile with -frepo :)

The problem is when you have two of them, they clash unless you have a 
"smart implementation" as Stroupstrup puts it ;)

Greetings, Stephan

-- 
As long as Linux remains a religion of freeware fanatics,
Microsoft have nothing to worry about.  
                       By Michael Surkan, PC Week Online

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic