building static binary

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

building static binary

Post by sadfub » Fri Jan 26, 2007 10:20 am

Hello,

please help me building a static binary of "my" application. First of all I'm using wx 2.8 from a directory install. And normally linking succeeds without any errors and the application is running. The corresponding wx-commands are:

Code: Select all

CXXFLAGS=  ... `~me/test/wxWidgets-2.8.0/buildgtk/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk --cxxflags` 
LDFLAGS= ... `~me/test/wxWidgets-2.8.0/buildgtk/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk --libs base,ogl,adv`
What should I do to achive a static binary of my application?

A 'wx-config --static=yes ...' doesn't work when wx wasn't compiled with '--disable-shared'. That's why I builded another wx in e.g. buildgtk-static/ and performed a '../configure --disable-shared' But now linking isnt working anymore. The corresponding wx-commands are:

Code: Select all

CXXFLAGS=  ... `~me/test/wxWidgets-2.8.0/buildgtk-static/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk-static/ --cxxflags` 
LDFLAGS= ... `~me/test/wxWidgets-2.8.0/buildgtk-static/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk-static/ --libs base,ogl,adv`
and the error remains always the same:

Code: Select all

...
../foobar.o(.text+0x1872):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSe
...
any help is appreciated.

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Fri Jan 26, 2007 11:14 am

Hi,

You need to rebuild wxWidgets (into a different dir, of course) with the --disable-shared configure option.

The various options used to be listed in INSTALL.txt, but now seem to have moved to install-gtk.txt

Regards,

David

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Fri Jan 26, 2007 9:35 pm

DavidHart wrote:Hi,
You need to rebuild wxWidgets (into a different dir, of course) with the --disable-shared configure option.
That's why I builded another wx in e.g. buildgtk-static/ and performed a '../configure --disable-shared'
I think it's already done ;)

Could you show what command you use to link? wx-config --libs, and the output of it? And is that the only error message it shows?

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Mon Jan 29, 2007 8:39 am

Yes, I allready configured with the --disable-shared option. I use the following command:

Code: Select all

`~me/test/wxWidgets-2.8.0/buildgtk-static/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk-static --static=yes --libs base,ogl,adv`
which results in:

Code: Select all

-L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread -L/usr/X11R6/lib /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_ogl-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a -lz -ldl -lm
and a `ls -la /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_*-2.8.a` results in:

Code: Select all

-rw-r--r--  1 mathgold id00 1799098 Jan 25 13:02 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a
-rw-r--r--  1 mathgold id00  272684 Jan 25 13:02 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_net-2.8.a
-rw-r--r--  1 mathgold id00   40456 Jan 25 13:10 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_xml-2.8.a
-rw-r--r--  1 mathgold id00 1346730 Jan 25 13:09 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a
-rw-r--r--  1 mathgold id00  451594 Jan 25 13:12 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_aui-2.8.a
-rw-r--r--  1 mathgold id00 7311754 Jan 25 13:08 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_core-2.8.a
-rw-r--r--  1 mathgold id00  593538 Jan 25 13:19 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_fl-2.8.a
-rw-r--r--  1 mathgold id00  332708 Jan 25 13:20 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_gizmos-2.8.a
-rw-r--r--  1 mathgold id00   11606 Jan 25 13:20 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_gizmos_xrc-2.8.a
-rw-r--r--  1 mathgold id00 1051168 Jan 25 13:10 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_html-2.8.a
-rw-r--r--  1 mathgold id00  173774 Jan 25 13:20 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_mmedia-2.8.a
-rw-r--r--  1 mathgold id00  567866 Jan 25 13:21 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_ogl-2.8.a
-rw-r--r--  1 mathgold id00  120496 Jan 25 13:21 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_plot-2.8.a
-rw-r--r--  1 mathgold id00  146230 Jan 25 13:10 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_qa-2.8.a
-rw-r--r--  1 mathgold id00 1466682 Jan 25 13:13 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_richtext-2.8.a
-rw-r--r--  1 mathgold id00 1333450 Jan 25 13:22 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_stc-2.8.a
-rw-r--r--  1 mathgold id00   71602 Jan 25 13:22 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_svg-2.8.a
-rw-r--r--  1 mathgold id00 1024152 Jan 25 13:12 /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_xrc-2.8.a
and then there are alots of error messages with unresolved symbols, I assume the linker doesn't find any of the needed wx-libraries.

Must I enable the '-static' option to g++ as well? And why can't I build static binaries from the dynamic wxWidgets version? (If I enable -static another lib (lgvc == graphviz) resolvement fails, and I've put the corresponding *.a libs in the project directory and tried a `-L.`, but then the linker still fails on the wxWidgets symbols.)

biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore
Contact:

Post by biplab » Mon Jan 29, 2007 10:06 am

Try issuing the following command.

Code: Select all

`~me/test/wxWidgets-2.8.0/buildgtk-static/wx-config --prefix=~me/test/wxWidgets-2.8.0/buildgtk-static --static=yes --libs ogl,adv,core,base`
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Mon Jan 29, 2007 10:26 am

Thanks, but this doesn't work either :(.

At this point I copied all static libraries (libwx_*.a) into the project directory and tried it with the '-L.' option but this doesn't work too. So I assume the linker finds the corresponding files, but cannot read them? I've configured wxWidgets only with './configure --disable-shared', am I missing some options like --enable-static? I dunno.

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Mon Jan 29, 2007 11:09 am

Yes, I allready configured with the --disable-shared option.
I'm sorry, I didn't read your original post properly.

It might be that the linker is finding the wrong libs. If there is both a libfoo,so and a libfoo.a available to it, the linker will choose the .so version.

The way I solve this is to create each wxWidgets '--prefix=' build in a different directory, as you have, and don't 'make install'. I then create a subdir called projects, and inside that a subdir for my app (Why? Because that's the way the samples do it, and I started by copying one of those makefiles). (I then create symlinks to my project's actual files, which I keep in a common area.)

What all that complication means is that I can then open a shell, cd to my app's subdir, and do:
PATH=../..:$PATH
./configure

This ensures that the first wx-config that is found is the one for this typle of build. So I can have static and dynamic, debug and release builds, of any number of wxWidgets versions, all in the same partition, and choose which to use without fear of conflict.

If you aren't using bakefile/autoconf to create a makefile, you can still do the same trick with PATH and then build with g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Tue Jan 30, 2007 10:01 am

DavidHart wrote: It might be that the linker is finding the wrong libs. If there is both a libfoo,so and a libfoo.a available to it, the linker will choose the .so version.

The way I solve this is to create each wxWidgets '--prefix=' build in a different directory, as you have, and don't 'make install'. I then create a subdir called projects, and inside that a subdir for my app (Why? Because that's the way the samples do it, and I started by copying one of those makefiles). (I then create symlinks to my project's actual files, which I keep in a common area.)

What all that complication means is that I can then open a shell, cd to my app's subdir, and do:
PATH=../..:$PATH
./configure

This ensures that the first wx-config that is found is the one for this typle of build. So I can have static and dynamic, debug and release builds, of any number of wxWidgets versions, all in the same partition, and choose which to use without fear of conflict.
I think the PATH=...-thing changes only the search-path for the wx-xonfig binary, but as you can see I use an explicit one in my Makefile, so no other should be used. If I run:

Code: Select all

PATH=/home/me/test/wxWidgets-2.8.0/buildgtk-static/:$PATH make -f Makefile2.8static
this should be the same. I've here the linkers full command:

Code: Select all

g++ -O3 -march=athlon -g -W -Wall -Wno-sign-compare -pipe -D_GUI_ -I/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/wx/include/gtk2-ansi-release-static-2.8 -I/home/me/test/wxWidgets-2.8.0/include -I/home/me/test/wxWidgets-2.8.0/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -pthread -I/usr/include/graphviz -Wl,--rpath -Wl,/usr/lib/graphviz -L/usr/lib/graphviz -lgvc -L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread -L/usr/X11R6/lib /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_ogl-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a -lz -ldl -lm content.o evthandler.o graphcanvas.o graphdiagram.o guiFrm.o guiApp.o optionFrm.o paramset.o resultlist.o searchthread.o ../bounds.o ../debug.o ../find_path.o ../graph.o ../pathset.o ../ptree.o ../qpath_trial.o ../trial.o ../util.o -o gui
As you can see there are only two includes outside or above from: /home/me/test/wxWidgets-2.8.0/buildgtk-static:
  • -I/home/me/test/wxWidgets-2.8.0/include
  • -I/home/me/test/wxWidgets-2.8.0/contrib/include
this seems a little strange to me. Also beneath /home/me/test/wxWidgets-2.8.0/buildgtk-static/ there are no includes. In the same directory there is also another wx installation: /home/me/test/wxWidgets-2.8.0/buildgtk/ this one is configured with no options and therefore dynamic. Could they interfere?

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Tue Jan 30, 2007 11:41 am

I think the PATH=...-thing changes only the search-path for the wx-config binary
Yes, but that's generally the critical thing: if you get the correct wx_config, everything else usually works.
In the same directory there is also another wx installation: /home/me/test/wxWidgets-2.8.0/buildgtk/ this one is configured with no options and therefore dynamic. Could they inferrence?
No, that the beauty of directory installs, they shouldn't interfere with each other at all.

If that was indeed your linker command, it seems to be missing quite a lot of wx stuff. This is the relevant bit of mine (unicode debug):

Code: Select all

/home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_xrc-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_xml-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_adv-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_html-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_core-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud-2.8.a
And this is the result of doing wx-config --libs in the build dir:

Code: Select all

-L/home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib -pthread   -L/usr/X11R6/lib64   /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_aui-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_xrc-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_qa-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_html-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_adv-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_core-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_xml-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_net-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud-2.8.a -pthread -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -ljpeg -ltiff -lexpat -lwxregexud-2.8 -lz -ldl -lm
I suggest you try running a couple of the samples, just to make sure that your wxWidgets static build was successful. If they work, please do the PATH= thing again, and post the result of doing wx-config --libs in that shell.

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Tue Jan 30, 2007 1:08 pm

DavidHart wrote: If that was indeed your linker command, it seems to be missing quite a lot of wx stuff. This is the relevant bit of mine (unicode debug):

Code: Select all

/home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_xrc-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_xml-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_adv-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_html-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_core-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud-2.8.a
Yes but I only used a 'wx-config --libs adv,ogl,base' and that is why I assume that I only have three static libs in the full linker command.
DavidHart wrote: And this is the result of doing wx-config --libs in the build dir:

Code: Select all

-L/home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib -pthread   -L/usr/X11R6/lib64   /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_aui-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_xrc-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_qa-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_html-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_adv-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_gtk2ud_core-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_xml-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud_net-2.8.a /home/david/devel/wxWindows/wxGTK-2.8.0/static-buildU/lib/libwx_baseud-2.8.a -pthread -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -ljpeg -ltiff -lexpat -lwxregexud-2.8 -lz -ldl -lm
and so is mine:

Code: Select all

[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static$ ls -l wx*
lrwxrwxrwx  1 me id00 50 Jan 25 13:00 wx-config -> lib/wx/config/inplace-gtk2-ansi-release-static-2.8
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static$ ./wx-config --libs
-L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread   -L/usr/X11R6/lib   
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_aui-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_xrc-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_qa-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_html-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_core-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_xml-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_net-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a 
-Wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -ljpeg -ltiff -lexpat -lz -ldl -lm
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static$ ./wx-config --libs ogl,adv,base
-L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread   -L/usr/X11R6/lib   
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_ogl-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a 
/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a 
-lz -ldl -lm
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static$
I assume that I only need ogl,adv and base, because If I build this as dynamic version everything works very well.
DavidHart wrote: I suggest you try running a couple of the samples, just to make sure that your wxWidgets static build was successful.
At this point I followed your advise for trying the samples: I've been in buildgtk-static/samples/widgets/ and performed a make which returned no errors and builded a static executable:

Code: Select all

[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/samples/widgets$ ls -l
total 5760
-rw-r--r--  1 me id00   11470 Jan 25 12:59 Makefile
-rwxr-xr-x  1 me id00 4518721 Jan 30 13:07 widgets
-rw-r--r--  1 me id00   78256 Jan 30 13:06 widgets_bmpcombobox.o
-rw-r--r--  1 me id00   61596 Jan 30 13:06 widgets_button.o
-rw-r--r--  1 me id00   48024 Jan 30 13:06 widgets_checkbox.o
-rw-r--r--  1 me id00   42628 Jan 30 13:06 widgets_clrpicker.o
-rw-r--r--  1 me id00   64876 Jan 30 13:06 widgets_combobox.o
-rw-r--r--  1 me id00   45012 Jan 30 13:06 widgets_datepick.o
-rw-r--r--  1 me id00   46960 Jan 30 13:06 widgets_dirctrl.o
-rw-r--r--  1 me id00   44264 Jan 30 13:06 widgets_dirpicker.o
-rw-r--r--  1 me id00   50152 Jan 30 13:06 widgets_filepicker.o
-rw-r--r--  1 me id00   43376 Jan 30 13:06 widgets_fontpicker.o
-rw-r--r--  1 me id00   47388 Jan 30 13:06 widgets_gauge.o
-rw-r--r--  1 me id00   47540 Jan 30 13:06 widgets_hyperlnk.o
-rw-r--r--  1 me id00   60416 Jan 30 13:06 widgets_listbox.o
-rw-r--r--  1 me id00   75248 Jan 30 13:07 widgets_notebook.o
-rw-r--r--  1 me id00   85244 Jan 30 13:07 widgets_odcombobox.o
-rw-r--r--  1 me id00   53068 Jan 30 13:07 widgets_radiobox.o
-rw-r--r--  1 me id00   58232 Jan 30 13:07 widgets_slider.o
-rw-r--r--  1 me id00   45044 Jan 30 13:07 widgets_spinbtn.o
-rw-r--r--  1 me id00   57768 Jan 30 13:07 widgets_static.o
-rw-r--r--  1 me id00   76644 Jan 30 13:07 widgets_textctrl.o
-rw-r--r--  1 me id00   36408 Jan 30 13:07 widgets_toggle.o
-rw-r--r--  1 me id00   95684 Jan 30 13:07 widgets_widgets.o
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/samples/widgets$ ./widgets
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/samples/widgets$ ldd widgets
        libz.so.1 => /usr/lib/libz.so.1 (0xb7f68000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7f64000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7f44000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7c66000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7be7000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7bc9000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7bb3000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7b90000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0xb7b89000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0xb7b7e000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7b45000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7b11000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7b0d000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7b07000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7a87000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb7a7e000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7a59000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7a3b000)
        libtiff.so.4 => /usr/lib/libtiff.so.4 (0xb79eb000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7930000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7927000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7918000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb77e3000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb771c000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb770e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f8b000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb7709000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0xb7701000)
        libXft.so.2 => /usr/lib/libXft.so.2 (0xb76ee000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7681000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7652000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7649000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7640000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb761a000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb7603000)
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/samples/widgets$
In the dynamic-dir, there the executable is really small and have dynamic wx symbols, so this is a little success :)

Code: Select all

[email protected]:~/test/wxWidgets-2.8.0/buildgtk/samples/widgets$ ls -ls
total 1956
 12 -rw-r--r--  1 me id00  11530 Jan 24 11:24 Makefile
624 -rwxr-xr-x  1 me id00 632323 Jan 30 13:10 widgets
 84 -rw-r--r--  1 me id00  78256 Jan 30 13:09 widgets_bmpcombobox.o
 68 -rw-r--r--  1 me id00  61596 Jan 30 13:09 widgets_button.o
 48 -rw-r--r--  1 me id00  48024 Jan 30 13:09 widgets_checkbox.o
 44 -rw-r--r--  1 me id00  42628 Jan 30 13:09 widgets_clrpicker.o
 68 -rw-r--r--  1 me id00  64876 Jan 30 13:09 widgets_combobox.o
 44 -rw-r--r--  1 me id00  45012 Jan 30 13:09 widgets_datepick.o
 48 -rw-r--r--  1 me id00  46960 Jan 30 13:09 widgets_dirctrl.o
 44 -rw-r--r--  1 me id00  44264 Jan 30 13:09 widgets_dirpicker.o
 56 -rw-r--r--  1 me id00  50152 Jan 30 13:09 widgets_filepicker.o
 44 -rw-r--r--  1 me id00  43376 Jan 30 13:09 widgets_fontpicker.o
 48 -rw-r--r--  1 me id00  47388 Jan 30 13:09 widgets_gauge.o
 48 -rw-r--r--  1 me id00  47540 Jan 30 13:09 widgets_hyperlnk.o
 64 -rw-r--r--  1 me id00  60416 Jan 30 13:09 widgets_listbox.o
 80 -rw-r--r--  1 me id00  75248 Jan 30 13:10 widgets_notebook.o
 88 -rw-r--r--  1 me id00  85244 Jan 30 13:10 widgets_odcombobox.o
 56 -rw-r--r--  1 me id00  53068 Jan 30 13:10 widgets_radiobox.o
 64 -rw-r--r--  1 me id00  58232 Jan 30 13:10 widgets_slider.o
 44 -rw-r--r--  1 me id00  45044 Jan 30 13:10 widgets_spinbtn.o
 64 -rw-r--r--  1 me id00  57768 Jan 30 13:10 widgets_static.o
 80 -rw-r--r--  1 me id00  76644 Jan 30 13:10 widgets_textctrl.o
 36 -rw-r--r--  1 me id00  36408 Jan 30 13:10 widgets_toggle.o
100 -rw-r--r--  1 me id00  95684 Jan 30 13:10 widgets_widgets.o
[email protected]:~/test/wxWidgets-2.8.0/buildgtk/samples/widgets$ ldd widgets
        libz.so.1 => /usr/lib/libz.so.1 (0xb7efc000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7ef8000)
        libwx_base_xml-2.8.so.0 => /home/me/test/wxWidgets-2.8.0/buildgtk/lib/libwx_base_xml-2.8.so.0 (0xb7eef000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7ecf000)
        libwx_gtk2_adv-2.8.so.0 => /home/me/test/wxWidgets-2.8.0/buildgtk/lib/libwx_gtk2_adv-2.8.so.0 (0xb7e19000)
        libwx_gtk2_html-2.8.so.0 => /home/me/test/wxWidgets-2.8.0/buildgtk/lib/libwx_gtk2_html-2.8.so.0 (0xb7d81000)
        libwx_gtk2_core-2.8.so.0 => /home/me/test/wxWidgets-2.8.0/buildgtk/lib/libwx_gtk2_core-2.8.so.0 (0xb7a4a000)
        libwx_base-2.8.so.0 => /home/me/test/wxWidgets-2.8.0/buildgtk/lib/libwx_base-2.8.so.0 (0xb7923000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7645000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb75c6000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb75a8000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7592000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb756f000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0xb7568000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0xb755d000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7524000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb74f0000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb74ec000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb74e6000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7466000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb745d000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7438000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb741a000)
        libtiff.so.4 => /usr/lib/libtiff.so.4 (0xb73ca000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb730f000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7306000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb72f7000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb71c2000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f1f000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb70fb000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb70f6000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0xb70ee000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb70e0000)
        libXft.so.2 => /usr/lib/libXft.so.2 (0xb70cd000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7060000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7031000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7027000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb701f000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb6ff9000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb6fe2000)
[email protected]:~/test/wxWidgets-2.8.0/buildgtk/samples/widgets$
DavidHart wrote: If they work, please do the PATH= thing again, and post the result of doing wx-config --libs in that shell.
first the wx-config in that shell:

Code: Select all

[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$ echo $PATH
../..:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:...
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$ wx-config --libs
-L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread   -L/usr/X11R6/lib   /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_aui-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_xrc-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_qa-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_html-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_core-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_xml-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base_net-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a -Wl,--export-dynamic -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lSM -lpng -ljpeg -ltiff -lexpat -lz -ldl -lm
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$ wx-config --libs ogl,adv,base
-L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib -pthread   -L/usr/X11R6/lib   /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_ogl-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_gtk2_adv-2.8.a /home/me/test/wxWidgets-2.8.0/buildgtk-static/lib/libwx_base-2.8.a -lz -ldl -lm
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$
then the modified the make command (only '--libs' instead of '--libs adv,ogl,base' and the paths to wx-config were replaced by just wx-config cause the PATH= thing should now manage this) and issued it, and the result remains the same :( :

Code: Select all

[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$ make -f Makefile2.8static 2>&1 | head -n 40
g++ -O3 -march=athlon -g -W -Wall -Wno-sign-compare -pipe -D_GUI_ `wx-config --cxxflags` `pkg-config libgvc --cflags`   -Wl,--rpath -Wl,`pkg-config libgvc --variable=libdir` `pkg-config libgvc --libs` `wx-config --libs` content.o evthandler.o graphcanvas.o graphdiagram.o guiFrm.o guiApp.o optionFrm.o paramset.o resultlist.o searchthread.o ../bounds.o ../debug.o ../find_path.o ../graph.o ../pathset.o ../ptree.o ../qpath_trial.o ../trial.o ../util.o -o gui
content.o(.gnu.linkonce.r._ZTV20wxThreadHelperThread+0xc):/usr/include/c++/3.3/bits/stl_tree.h:845: undefined reference to `wxThread::TestDestroy()'
content.o(.gnu.linkonce.t._ZN20wxThreadHelperThreadD1Ev+0x13): In function `wxThreadHelperThread::~wxThreadHelperThread [in-charge]()':
/usr/include/c++/3.3/bits/stl_tree.h:851: undefined reference to `wxThread::~wxThread [not-in-charge]()'
content.o(.gnu.linkonce.t._ZN20wxThreadHelperThreadD0Ev+0x16): In function `wxThreadHelperThread::~wxThreadHelperThread [in-charge deleting]()':
/usr/include/c++/3.3/bits/stl_tree.h:1290: undefined reference to `wxThread::~wxThread [not-in-charge]()'
content.o(.gnu.linkonce.r._ZTI20wxThreadHelperThread+0x8):/usr/include/c++/3.3/bits/stl_tree.h:1286: undefined reference to `typeinfo for wxThread'
evthandler.o(.text+0xee): In function `CanvasEvtHandler::CanvasEvtHandler[not-in-charge](wxShapeEvtHandler*, wxShape*, unsigned const&, Graph const*)':
/usr/include/c++/3.3/bits/stl_tree.h:331: undefined reference to `wxShapeEvtHandler::wxShapeEvtHandler[not-in-charge](wxShapeEvtHandler*, wxShape*)'
evthandler.o(.text+0xf4): In function `CanvasEvtHandler::CanvasEvtHandler[not-in-charge](wxShapeEvtHandler*, wxShape*, unsigned const&, Graph const*)':
/home/me/test/wxWidgets-2.8.0/include/wx/string.h:270: undefined reference to `wxEmptyString'
evthandler.o(.text+0x13e): In function `CanvasEvtHandler::CanvasEvtHandler[in-charge](wxShapeEvtHandler*, wxShape*, unsigned const&, Graph const*)':
/usr/include/c++/3.3/bits/stl_tree.h:498: undefined reference to `wxShapeEvtHandler::wxShapeEvtHandler[not-in-charge](wxShapeEvtHandler*, wxShape*)'
evthandler.o(.text+0x144): In function `CanvasEvtHandler::CanvasEvtHandler[in-charge](wxShapeEvtHandler*, wxShape*, unsigned const&, Graph const*)':
/home/me/test/wxWidgets-2.8.0/include/wx/string.h:270: undefined reference to `wxEmptyString'
evthandler.o(.text+0x1a3): In function `CanvasEvtHandler::~CanvasEvtHandler [not-in-charge]()':
/home/me/test/wxWidgets-2.8.0/include/wx/string.h:226: undefined reference to `wxShapeEvtHandler::~wxShapeEvtHandler [not-in-charge]()'
evthandler.o(.text+0x1f3): In function `CanvasEvtHandler::~CanvasEvtHandler [in-charge]()':
/usr/include/c++/3.3/bits/stl_tree.h:462: undefined reference to `wxShapeEvtHandler::~wxShapeEvtHandler [not-in-charge]()'
evthandler.o(.text+0x243): In function `CanvasEvtHandler::~CanvasEvtHandler [in-charge deleting]()':
/usr/include/c++/3.3/bits/stl_tree.h:413: undefined reference to `wxShapeEvtHandler::~wxShapeEvtHandler [not-in-charge]()'
evthandler.o(.text+0x26b): In function `CanvasEvtHandler::OnLeftClick(double, double, int, int)':
/home/me/test/wxWidgets-2.8.0/include/wx/string.h:270: undefined reference to `wxEmptyString'
evthandler.o(.text+0x288): In function `CanvasEvtHandler::OnLeftClick(double, double, int, int)':
/usr/include/c++/3.3/bits/stl_tree.h:113: undefined reference to `wxLineShape::ms_classInfo'
evthandler.o(.text+0x293): In function `CanvasEvtHandler::OnLeftClick(double, double, int, int)':
/home/me/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui/evthandler.cpp:30: undefined reference to `wxObject::IsKindOf(wxClassInfo*) const'
evthandler.o(.text+0x2c9): In function `CanvasEvtHandler::OnLeftClick(double, double, int, int)':
/usr/include/c++/3.3/bits/stl_tree.h:372: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x314): In function `CanvasEvtHandler::OnLeftClick(double, double, int, int)':
/home/me/test/wxWidgets-2.8.0/include/wx/string.h:370: undefined reference to `wxStringBase::InitWith(char const*, unsigned, unsigned)'
evthandler.o(.text+0x331):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x35f):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x3a1):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:939: undefined reference to `wxString::Format(char const*, ...)'
evthandler.o(.text+0x3c1):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x423):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x46b):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:370: undefined reference to `wxStringBase::InitWith(char const*, unsigned, unsigned)'
evthandler.o(.text+0x488):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x5d8):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned, char const*, unsigned)'
evthandler.o(.text+0x620):/home/me/test/wxWidgets-2.8.0/include/wx/string.h:370: undefined reference to `wxStringBase::InitWith(char const*, unsigned, unsigned)'
[email protected]:~/test/wxWidgets-2.8.0/buildgtk-static/colorcode/gui$
Ofcourse I did invoked a 'make -f Makefile2.8static clean' and assured that there are not defective old object-files.

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Tue Jan 30, 2007 2:11 pm

Hmm. If the samples build and run OK, then the static wxWidgets build must be OK.

I really don't know what's going wrong. So some random ideas that you might or might not want to try:
  • Compare the 'minimal' sample makefile with yours. If that doesn't reveal anything obvious, try hacking your files into that sample's makefile, and use that in place of yours.
    Try to build your app by the command-line "g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo" method.
    Create your makefile the bakefile way: see http://forums.wxwidgets.org/viewtopic.php?t=5848
    Give up and use dynamic linking :(
Sorry I couldn't help.

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Tue Jan 30, 2007 2:27 pm

DavidHart wrote:Hmm. If the samples build and run OK, then the static wxWidgets build must be OK.

I really don't know what's going wrong. So some random ideas that you might or might not want to try:
  • Compare the 'minimal' sample makefile with yours. If that doesn't reveal anything obvious, try hacking your files into that sample's makefile, and use that in place of yours.
Thats what I'll try, cause static linking works with the samples it has to work with my damn project too :). When I've found the soloution I'll post it here for others having the same problem.

DavidHart wrote:Give up and use dynamic linking :([/list]
Sorry I couldn't help.
Nope, I will try a 'little' more. And ofcourse you've had helped me, cause now I am surer that the directory-install was successfull and I made no silly configure-misstakes. Thanks anyway.

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Wed Jan 31, 2007 12:19 am

maybe try to add wx-config --libs alone, just to make sure you didn't ommit an important module by just supplying adv,ogl and base. I had similar errors once

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Post by sadfub » Wed Jan 31, 2007 8:57 am

As you can see the dynamic version contains the adv, html, xml, base modules linked to it though I specified only adv,ogl,base however, in the last trying (see above), I've modified the linker command to just what you've said 'wx-config --libs'. However, now I start all over again with one of those samples. Thanks for your reply.

sadfub
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Jan 26, 2007 9:55 am
Contact:

Praise the samples

Post by sadfub » Wed Jan 31, 2007 9:36 am

Hi, one of our glorious team members got it tonight finally with this linker command working :)

Code: Select all

g++ -O3 -march=athlon -g -o gui ./*.o ../*.o -L/home/me/test/wxWidgets-2.8.0/buildgtk-static/lib  -Wl,--rpath -Wl,`pkg-config libgvc --variable=libdir` `pkg-config libgvc --libs` -lwx_gtk2_adv-2.8  -lwx_gtk2_core-2.8 -lwx_base-2.8  -lwx_gtk2_ogl-2.8 -L/usr/X11R6/lib -lgtk-x11-2.0 -lXxf86vm -lgthread-2.0 -lSM
As you can see there are now strange and ugly looking '-lwx-foobars' :D :D, but this command got it linked and most important. this done statically as you can see:

Code: Select all

[email protected]:~/colorcode/gui$ ldd gui
        libgvc.so.2 => /usr/lib/graphviz/libgvc.so.2 (0xb7ebc000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7bcd000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7bc8000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb7bbf000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7b05000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7ae3000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ada000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb79a4000)
        libgraph.so.2 => /usr/lib/graphviz/libgraph.so.2 (0xb7999000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7983000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7904000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb783d000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7804000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb77cf000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb77cc000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb774c000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb773d000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb772f000)
        libcdt.so.2 => /usr/lib/graphviz/libcdt.so.2 (0xb772a000)
        libpathplan.so.2 => /usr/lib/graphviz/libpathplan.so.2 (0xb771d000)
        libgvgd.so.2 => /usr/lib/graphviz/libgvgd.so.2 (0xb76ce000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb76ae000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb769c000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7695000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0xb768e000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0xb7682000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7664000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7660000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb7649000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f30000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb7645000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0xb763c000)
        libXft.so.2 => /usr/lib/libXft.so.2 (0xb7629000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb75bc000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb758d000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7584000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb757c000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb755d000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7538000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7512000)

Post Reply