Linking problem

Rick Sivernell res005ru
Mon Feb 21 10:34:32 PST 2005


On Mon, 21 Feb 2005 09:17:56 -0600
Rick Sivernell <res005ru at verizon.net> wrote:

> On Mon, 21 Feb 2005 09:42:34 +0100
> Roger Oberholtzer <roger at opq.se> wrote:
> 
> > On Sun, 2005-02-20 at 15:50 -0600, Rick Sivernell wrote:
> > > List, compile link guru;s
> > > 
> > >   Having a bit of a sticky wiket here, as our Brit bros & sisters would say.
> > >   I
> > > have a peice of code that has not changed in a while. But when I installed
> > > the Suse 9.2 on this AMD64 I got some new code version of a build system,
> > > the name is SCONS. Well I have gotten everything back up the last step in
> > > rebuild ing the code. But the following will not link in the proper library
> > > wx_based-2.5, which is libwx_based-2.5.so in the /usr/local/lib directory: 
> > > g++ -o silverware mainframe.o classviewframe.o silverwareIDE.o
> > > -L/usr/local/lib -Llib/debug -L/usr/X11R6/lib64 -lwx_based-2.5
> > > -lwx_based_net-2.5 -lwx_gtk2d_core-2.5 -lwx_gtk2d_svg-2.5 -lwx_gtk2d_adv-2.5
> > > -lwx_gtk2d_animate-2.5 -lwx_gtk2d_xrc-2.5 -lregistryD -lwidgetsD -lide_editD
> > > -ldlgsD -lviewsD -lideutilityD -lX11 -lXpm -lXext -lpthread
> > > 
> > > What I get is unresoled error for my code from the linker.  I have the
> > > /usr/local/lib in /etc/ld.so.conf ldconfig -v | grep libwx_based-2.5.3.so is
> > > found. I just can not seem to get the linker to find the library. As can be
> > > seen above the -L/usr/local/lib should do the trick, but no joy.  Anyone
> > > have any ideas here?  This s a Suse 9.2 on an Asus K8N-E Delux mobo with 2
> > > gig memory & 2 250 hds. An AMD64 cpu.
> > 
> > What is the message? I am guessing that the libs were not compiled
> > locally, and just copied, right? Still, the error message is useful.
> > Could it be that there is a different version of the library earlier in
> > the search path that is being used, rather that the one you want to be
> > used?
> > 
> > -- 
> > Roger Oberholtzer <roger at opq.se>
> > 
> > _______________________________________________
> > Linux-users mailing list
> > Linux-users at linux-sxs.org
> > http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
> > 
> > Need to chat further on this subject? Check out #linux-users on
> > irc.linux-sxs.org !
> Roger
> 
>   No, I compiled the libraries myself, actually rebuilt severaltimes, the
>   program
> code has 5 sub dirs which have code that interfaces & build prperly with the
> libs in question. The sub dirs are themselves a set of libraries. The libs I am
> trying to use are a wxWidgets gui platform. The code I have developed has
> copiled and ran 6 weeks ago under a last version of this build system. My build
> system is called Scons, a python based sw build system. I have gotten all to
> coile and build properly now upto the final step of linking everything to
> gether. The eror is undfined resolution as below:
> mainframe.o(.text+0x420): In function
> `CMainFrame::CMainFrame[not-in-charge](wxWindow*, int, wxString const&, wxPoint
> const&, wxSize const&, long)': /swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:203:
> undefined reference to `wxObject::operator new(unsigned long, char const*, int)'
> mainframe.o(.text+0x6fb):/swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:226:
> undefined reference to `wxObject::operator new(unsigned long, char const*, int)'
> mainframe.o(.text+0x798):/swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:230:
> undefined reference to `wxObject::operator new(unsigned long, char const*, int)'
> mainframe.o(.text+0xa93):/swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:248:
> undefined reference to `wxObject::operator new(unsigned long, char const*, int)'
> mainframe.o(.text+0x123c): In function
> `CMainFrame::CMainFrame[in-charge](wxWindow*, int, wxString const&, wxPoint
> const&,wxSize const&, long)': /swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:203:
> undefined reference to `wxObject::operator new(unsigned long, char const*, int)'
> mainframe.o(.text+0x1517):/swdev/dnr/2.5.3/silverwareIDE/mainframe.cpp:226: more
> undefined references to `wxObject::operator new(unsigned long, char const*,
> int)' follow mainframe.o(.text+0x583f): In function
> `__static_initialization_and_destruction_0':
> /usr/local/include/wx-2.5/wx/memory.h:327: undefined reference to
> `wxDebugContextDumpDelayCounter::wxDebugContextDumpDelayCounter[in-charge]()'
> 
> link :
> g++ -o silverware mainframe.o classviewframe.o silverwareIDE.o
>  -L/usr/local/lib -Llib/debug -L/usr/X11R6/lib64 -lwx_based-2.5
>  -lwx_based_net-2.5 -lwx_gtk2d_core-2.5 -lwx_gtk2d_svg-2.5 -lwx_gtk2d_adv-2.5
>  -lwx_gtk2d_animate-2.5 -lwx_gtk2d_xrc-2.5 -lregistryD -lwidgetsD -lide_editD
>  -ldlgsD -lviewsD -lideutilityD -lX11 -lXpm -lXext -lpthread
>  
> The unresolved are located in a lib named libwx_based-21.5.so in my
> /usr/local/lib dir. The ldconfig -v finds it and all of the wxWidget libs there.
>  The
> /etc/ld.so.conf has all lib dirs listed and the compile/link has the dirs need
> listed in the -L. I have compiled the samples programs with wxWidgets and they
> work. I have created a test program with KDevelop 3.1 using wxWidgets and it
> works. My program does not use a IDE to create and run,  just n editor to code
> and a terminala to build. I have also used the above link on a cmdline in a
> terminal and got the same results.
> 
> cheers
>  -- 
> Rick Sivernell
> Dallas, Texas  75287
> 972 306-2296
> res005ru at verizon.net
> Registered Linux User
> 
>    .~.
>   / v \
>  /( _ )\
>    ^ ^
> In Linux we trust!
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
> 
> Need to chat further on this subject? Check out #linux-users on
> irc.linux-sxs.org !

 Sorry for rply to own reply, but I think I know what is going on, will post when
I know for sure. It does appear to be a change in the library at the lowest level.
It is a combo of #def's.

cheers

-- 
Rick Sivernell
Dallas, Texas  75287
972 306-2296
res005ru at verizon.net
Registered Linux User

   .~.
  / v \
 /( _ )\
   ^ ^
In Linux we trust!


More information about the Linux-users mailing list