Create a folder containing the binary and the Windows. It won't run on our Linux system, because it's targeting Windows ! I586-mingw32msvc-gcc source.c -o executable.exe `pkg-config -cflags -libs gtk+-3.0`Ī new executable should have been created if everything went well. We are ready to compile an sample C source ! Let's use a command in this style : :Įxport PKG_CONFIG_PATH=/opt/gtk3-win32/lib/pkgconfig If you extracted to " /opt/gtk3-win32" e.g. We will tell "pkg-config" to locate GTK+ libraries in our custom path. :įind -name '*.pc' | while read pc do sed -e -i "$pc" done If you extracted it to " /opt/gtk3-win32" e.g. In a terminal, move to the " gtk3-win32" folder you just created. (ps : Create a folder named " gtk3-win32" where you want, put the ZIP archive therein and extract it with : Download the latest all-in-one bundle ZIP archive directly from the official website (here's a direct link for impatients.). Install the GCC compiler for Windows (namely MinGW) : We have a C application using GTK+ 3 as its graphical toolkit :Īs the GTK+ 3 Windows binaries now have an official distribution, we will be able to use to create a Windows version of our application, without modifiying the source code nor having a Windows box available. Objectives : compile a C/GTK+3 application under Linux, and produce a valid Windows © binary.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |