Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:win32:crosscompile [2016/03/13 15:47] – Moved from https://www.geany.org/Support/CrossCompile - needs heavy update enricohowtos:win32:crosscompile [2022/11/19 12:02] (current) – Update tags enrico
Line 1: Line 1:
 +<WRAP center round important 60%>
 +Moved from https://www.geany.org/Support/CrossCompile, unmodified.
 +The information are heavily outdated and need to be adjusted for MSYS2.
 +</WRAP>
 +
 +
 +
 +====== Cross Compiling on Linux to build Geany for Windows ======
 +
 +===== Getting the files =====
  
-Setting up a cross compiler on Linux to build Geany for Windows 
-Getting the files 
  
 You need the following files: First the compiler with all related tools(binutils, linker, ...). Visit http://www.libsdl.org/extras/win32/cross/ there are precompiled binaries for x86 Linux available and also a script to compile all by hand. I used the precompiled binaries to save time. Then download cross-make.sh and cross-configure.sh from the same site. There is also a ReadMe file, which has more information. You need the following files: First the compiler with all related tools(binutils, linker, ...). Visit http://www.libsdl.org/extras/win32/cross/ there are precompiled binaries for x86 Linux available and also a script to compile all by hand. I used the precompiled binaries to save time. Then download cross-make.sh and cross-configure.sh from the same site. There is also a ReadMe file, which has more information.
Line 8: Line 16:
  
 Furthermore, you need some libraries and their include files for the GTK environment. The easiest way to get them is to use the GTK Bundle available on http://www.gtk.org/download-windows.html and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip. Furthermore, you need some libraries and their include files for the GTK environment. The easiest way to get them is to use the GTK Bundle available on http://www.gtk.org/download-windows.html and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip.
-Libiberty+ 
 +==== Libiberty ==== 
  
 And don't forget to get a newer version of libiberty. The one included in the binary archive is missing some symbols which are needed. A working version can be found here: http://files.uvena.de/misc/libiberty.a.gz (note that this file is also from the mingw32 project). Probably, you won't need this file if you are compile the compiler and related tools by hand. And don't forget to get a newer version of libiberty. The one included in the binary archive is missing some symbols which are needed. A working version can be found here: http://files.uvena.de/misc/libiberty.a.gz (note that this file is also from the mingw32 project). Probably, you won't need this file if you are compile the compiler and related tools by hand.
-Unpacking the files+ 
 +=== Unpacking the files === 
  
 Now, after downloading the files, they have to be extracted. Start with the precompiled binaries. Extract them somewhere to your filesystem, I recommend /usr/local/cross-tools, then you have not much work with adjusting paths. /usr/local/cross-tools is now the PREFIX and all other files should be extracted into this directory. So, proceed with the other archives and extract them into your prefix. Now, after downloading the files, they have to be extracted. Start with the precompiled binaries. Extract them somewhere to your filesystem, I recommend /usr/local/cross-tools, then you have not much work with adjusting paths. /usr/local/cross-tools is now the PREFIX and all other files should be extracted into this directory. So, proceed with the other archives and extract them into your prefix.
Line 18: Line 30:
  
 The file libiberty.a.gz has to be extracted to PREFIX/lib/. The file libiberty.a.gz has to be extracted to PREFIX/lib/.
-Setting up the environment+ 
 +== Setting up the environment == 
  
 First, go to PREFIX/lib/pkgconfig/ and edit all .pc files. They have a line prefix= which you have to edit and set it to your prefix, in my case /usr/local/cross-tools/. Do this for every .pc file. Yura Siamashka wrote a nice script to do this at once, you can download it here: fix_pkgconfig.sh. First, go to PREFIX/lib/pkgconfig/ and edit all .pc files. They have a line prefix= which you have to edit and set it to your prefix, in my case /usr/local/cross-tools/. Do this for every .pc file. Yura Siamashka wrote a nice script to do this at once, you can download it here: fix_pkgconfig.sh.
Line 28: Line 42:
  
 Don't forget to adjust your paths. The other script doesn't have to be modified. Don't forget to adjust your paths. The other script doesn't have to be modified.
-Configuring and compiling your sources+ 
 +== Configuring and compiling your sources == 
  
 You have done the job. If all went well, you can start compiling your sources. For configuring and compiling you should use the two scripts. cross-configure.sh can be used like the usual ./configure command. You have done the job. If all went well, you can start compiling your sources. For configuring and compiling you should use the two scripts. cross-configure.sh can be used like the usual ./configure command.
Line 45: Line 61:
  
 The option --enable-gnu-regex is necessary to use the bundled regular expression implementation which is necessary to be used on Windows. The option --enable-gnu-regex is necessary to use the bundled regular expression implementation which is necessary to be used on Windows.
-Links+ 
 +== Links == 
  
 For more information about the toolchain and some further information and what to take care about can be found on the following sites: For more information about the toolchain and some further information and what to take care about can be found on the following sites:
Line 61: Line 79:
 http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip
  
 +{{tag>howto windows build cross-compile}}
Print/export