You are not logged in.

#1 2020-06-18 10:48:08

Benoit
Member
Registered: 2020-06-18
Posts: 3

Cross compiling to windows && gtk3

Hello.
I am trying to compile programs for a windows computer. I've installed this package: https://aur.archlinux.org/packages/mingw-w64-gcc/  , which has compiled a hello world program. This program runs correctly on Windows.
I'm trying now to cross compile using the gtk3 library. I have installed that: https://aur.archlinux.org/packages/mingw-w64-gtk3-bin/ , which was a nightmare because of all the dependances. I've found that this library installs binaries here: /usr/x86_64-w64-mingw32/lib/pkgconfig . When I try to build a program with this library, with the command

 i686-w64-mingw32-gcc main.c `pkg-config --cflags --libs gtk+-3.0` 

, after having 

export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/lib/pkgconfig 

, I have an error:

/usr/lib/gcc/i686-w64-mingw32/10.1.0/../../../../i686-w64-mingw32/bin/ld: /usr/x86_64-w64-mingw32/lib/libmingw32.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status

Does someone understand it? I must have done something wrong, but I don't understand what.
edit: I'd put a wrong url. :-(

Last edited by Benoit (2020-06-18 11:31:31)

Offline

#2 2020-06-18 12:48:32

Benoit
Member
Registered: 2020-06-18
Posts: 3

Re: Cross compiling to windows && gtk3

I used x86_64-minw32-gcc ans reinstalled mingw32-glib2 and that works :-)

Offline

Board footer

Powered by FluxBB