|
Cross-compiling / 2012-02-13 10:19:36
To cross-compile Classic AmigaOS programs on Windows, there are two choices:
Using AmiDevCpp
TO BE CONTINUED
Using Cygwin and GCC
- A Window-operated computer and Cygwin installed: Cygwin provides a good documentation so I won't repeat it here. I will assume that
- 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:
- 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/.
- 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.
- Download the LibNIX v1.2 libraries at libnix-1.2.tar. Extract the content of libnix-1.2.tar into /usr/local/.
- Download the IXEmul v48.0 libraries at ixemul-48.0.tar. Extract the content of ixemul-48.0.tar into /usr/local/.
- At this point, in CygWin, typing:
/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
- Then, the following piece of code should compile and run on your classic Amiga or in WinUAE:
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
- Enjoy!
|
|