0

I'm trying to compile my program for windows, i'm using mingw

i686-w64-mingw32-gcc Pagina_inicial.c -o Pagina_inicial `pkg-config --libs --cflags gtk+-2.0 mysqlclient`

but only the --cflags was find, the --libs does ld return error.

/usr/bin/i686-w64-mingw32-ld: cannot find -lgtk-x11-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lgdk-x11-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lpangocairo-1.0
/usr/bin/i686-w64-mingw32-ld: cannot find -latk-1.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lcairo
/usr/bin/i686-w64-mingw32-ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lgio-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lpangoft2-1.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lpango-1.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/i686-w64-mingw32-ld: cannot find -lfontconfig
/usr/bin/i686-w64-mingw32-ld: cannot find -lfreetype
/usr/bin/i686-w64-mingw32-ld: cannot find -lmariadb
/usr/bin/i686-w64-mingw32-ld: cannot find -lz
/usr/bin/i686-w64-mingw32-ld: cannot find -ldl
/usr/bin/i686-w64-mingw32-ld: cannot find -lgnutls
collect2: error: ld returned 1 exit status

I already tryed put the paths manually but problably im using wrongs paths, someone can helpe me?

Calisto
  • 46
  • 1
  • 4
  • Are you doing a cross-compile to build a windows binary on some other system? Or are you building on windows? For a cross-compile, you'll need mingw32 versions of all those packages and you need a version of `pkg-config` that finds them instead of native packages (eg, `i686-w64-mingw32-pkg-config`) – Chris Dodd Nov 04 '19 at 23:24
  • I tryied with i686-w64-mingw32-pkg-config --libs --cflags gtk+-2.0 But pkg-config cant find the libs, i have to copy from my linux include to the mingw folders? – Calisto Nov 05 '19 at 00:31
  • You need to install the mingw packages -- the linux packages won't work on windows. – Chris Dodd Nov 05 '19 at 05:05

0 Answers0