5

I am trying to compile simple "Hello World!" gtkmm source code provided in gtkmm tutorial with mingw on Linux in order to make a Windows executable file.

I can execute complied source code by the following command line: g++ main.cpp -o bin `pkg-config gtkmm-3.0 --cflags --libs` on linux and everything works fine but when I try to use i686-w64-mingw32-g++ main.cpp -o bin `pkg-config gtkmm-3.0 --cflags --libs`, it fails showing this error:

i686-w64-mingw32-g++: error: unrecognized option ‘-pthread’

Is there anything that I miss and must be installed before compiling ?

And also, is there a neat tutorial for cross-compiling (especially about gtk+ or gtkmm)? I have searched a lot but there was nothing useful.

ptomato
  • 56,175
  • 13
  • 112
  • 165
westellsfi
  • 51
  • 2
  • Have you modified the `PKG_CONFIG_SYSROOT_DIR` and `PKG_CONFIG_DIR` environment variables so that pkg-config returns options for the cross compilation rather than the native compilation ? – alexisdm Oct 31 '12 at 10:18
  • No, could you give me a little bit more explanation or a link to helpful document ? – westellsfi Oct 31 '12 at 13:26
  • 1
    You should already have found this one: http://www.flameeyes.eu/autotools-mythbuster/pkgconfig/cross-compiling.html – alexisdm Oct 31 '12 at 18:03

0 Answers0