Link wxWidgets application statically and run on any linux distribution without missing any dependency files.
This tutorial inspired by article written by Tierra here, mentioned about linking with gtk and run on any linux. Also to show you how to make static linking to libstdc++ since various linux distribution will have different version of this library that could lead to error program to running.
Note: Remember that GTK is licensed under LGPL, which essentially means that
in order to link it to your application _statically_, your application
will have to be (L)GPL-licensed.
$ sudo mkdir -p /opt/wxWidgets
$ cd /opt/wxWidgets
$ wget http://ftp.wxwidgets.org/pub/3.0.2/wxWidgets-3.0.2.tar.bz2
$ tar -xapvf wxWidgets-3.0.2.tar.bz2
$ cd wxWidgets-3.0.2
$ mkdir -p build2/wx3.0.2u_static
$ cd build2/wx3.0.2u_static
$ ../../configure --disable-shared --with-gtk --with-libtiff=builtin --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-zlib=builtin --with-expat=builtin LDFLAGS="-static-libgcc -static-libstdc++"
$ make
Note: using similar switch as shown at autoconf above , you may also build/compile any Plain C/C++ application to link statically.
Tuesday, August 18, 2015
Build wxWidgets Application to Run on Any Linux
Related Posts:
Cross Compile WxWidgets/C++ Application for Raspberry Pi How to Build wxWidgets / C++ for Raspberry Pi Model 2 (ARMv7 Architecture). UPDATED: For ease to install and configure Eclipse-IDE/Toolc… Read More
Download Raspberry Pi Toolchain - Cross Compiler Develop, test, run your application on Linux desktop, and deploy on Rasberry Pi2 board, x86_64 and other Linux machine..... Cross compiler applicat… Read More
Build wxWidgets Application to Run on Any LinuxLink wxWidgets application statically and run on any linux distribution without missing any dependency files. This tutorial inspired by article writt… Read More
Howto Build wxWidgets with MinGWThis tutorial is intended for the beginner who wish to have wxWidgets up and running in Windows environment. The build using MinGW without Msys. Inst… Read More
GUI Designer for wxWidgets using wxFormBuilder I used wxFormBuilder frequently in recent years as GUI Designer when coding with wxWidgets. This RAD tools very much help programmer to build GUI up … Read More
0 comments:
Post a Comment