I am trying to compile a GTK application for 32bit linux from 64bit linux.
When I run this command:
gcc main.c -m32 -mms-bitfields -o output/main `pkg-config --cflags --libs gtk+-3.0` && ./output/main
I get these errors:
/usr/bin/ld: cannot find -lgtk-3
/usr/bin/ld: cannot find -lgdk-3
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lpangocairo-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lcairo-gobject
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -lcairo
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
Running Linux Mint 17.2 Rafaela.
I have all the required packages and I've even included the -m32
option but it still doesnt work.
There is also a similar question here which doesn't have an accepted answer.
Edit:
The accepted answer below suggested I install the 32bit version of libgtk-3-dev
. I could not do this without removing important system packages. In the end I resorted to simply using a 32bit linux distro with the 32bit version of libgtk-3-dev
installed.