Cross-compiling / 2012-02-13 10:21:38

To cross-compile Classic AmigaOS programs on Windows, there are two choices:

Using AmiDevCpp

TO BE CONTINUED

Using Cygwin and GCC

  1. A Window-operated computer and Cygwin installed: Cygwin provides a good documentation so I won't repeat it here. I will assume that
  2. A cross-compiler: Zerohero provides everything that you need on this Web page, which provides all the details to install the cross-compiler without problems. Unfortunately as of 2012/02/13 this page is down, so I try to reproduce below the steps as well as provide the required files:
    1. Download the cross-compiler GCC v3.4.0 at m68k-amigaos-gcc-3.4.0.tar. Extract the content of m68k-amigaos-gcc-3.4.0.tar into /usr/local/.
    2. Download the cross-compiler utils v2.14 at m68k-amigaos-binutils-2.14.tar. Extract the content of m68k-amigaos-binutils-2.14.tar into /usr/local/amiga/bin.
    3. Download the LibNIX v1.2 libraries at libnix-1.2.tar. Extract the content of libnix-1.2.tar into /usr/local/.
    4. Download the IXEmul v48.0 libraries at ixemul-48.0.tar. Extract the content of ixemul-48.0.tar into /usr/local/.
    5. At this point, in CygWin, typing:
    6. /usr/local/amiga/bin/m68k-amigaos-gcc.exe -v
      

      should return:

      Reading specs from /usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/specs
      Configured with: ../gcc-3.4.0/configure --prefix=/usr/local/amiga --target=m68k-amigaos --enable-languages=c,c++,objc --enable-haifa --enable-sjlj-exceptions --disable-shared --disable-libstdcxx-pch
      Thread model: single
      gcc version 3.4.0
      
    7. Then, the following piece of code should compile and run on your classic Amiga or in WinUAE:
    8. #include <stdio.h>
      int main()
      {
          printf("Hello World!\n");
          return 0;
      }
      
    9.  Enjoy!