My Gentoo (amd64) is up to date, I have the newest (not masked) versions of all installed applications. That means I'm using wxWidgets 2.6, not 2.8, because 2.8 is still masked ~amd64.
I programmed an application with wxWidgets 2.6 and compiled it with
Code: Select all
g++ `wx-config --libs --cppflags` *.cppSo I copied the file to another amd64 PC and wanted to run it. I was told:
On that PC wxWidgets isn't installed. I think the reason is, that wxWidgets links its libraries dynamically.error while loading shared libraries: libwx_gtk2u_xrc-2.6.so.0: cannot open shared object file: No such file or directory
But I want my applications to run on any operating system (Windows too) without wxWidgets being installed there - that's the reason why I chose wxWidgets and not GTK+.
So I tried to link the wxWidgets libraries statically to my application with
Code: Select all
g++ -static `wx-config --libs --cppflags` *.cppCode: Select all
g++ `wx-config --libs --cppflags --static` *.cppCode: Select all
wx-config --staticLooks like my wxWidget installation hasn't the ability to link itself statically. I searched for other wxWidgets builds in the portage tree but didn't find any.$ wx-config --static
Warning: No config found to match: /usr/bin/wx-config --static
in /usr/lib64/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
Code: Select all
equery uses wxGTKIs there a possibility to teach my wxWidgets to build itself statically?
-Heinzi

