PDA

View Full Version : Programmers question


Tolismlf
20 November 2004, 18:57
If i have the source code of a simple program that runs on PC would i be able to compile it and run it on Amiga? The program is written in C++. Please help.
What would i need to do that if it's possible?
:help

thomas
20 November 2004, 19:07
If it has no GUI, no Windows stuff etc. then yes. However the only C++ compilers for AmigaOS are GCC and StormC. GCC is a real pain to install and StormC is commercial.

If the program was C only there would be some easy to use compilers for the Amiga, e.g. DiceC or VBCC.

http://gg.portail-e.com/geekgadgets/amiga/m68k/alpha/gcc/
http://www.kefren.be/modules.php?name=Downloads&d_op=viewdownload&cid=1
http://www.haage-partner.com/storm/sc_e.htm
http://de.aminet.net/aminetbin/find?dice-3
http://de.aminet.net/aminetbin/find?vbcc.lha

Tolismlf
20 November 2004, 19:23
What is a compiler's job? It makes a program "viewable" or lets maybe better say executable by the computer?

Tolismlf
20 November 2004, 19:59
I 've just downloaded Storm C demo for Amiga and Dev C++ for Windows also some simple source codes, i guess i will try and experiment myself..

Asterix
21 November 2004, 10:56
:agree A compilers job is to translate your source code into a computer understandable code that could be executed. this has to be done before the computer can "use" your code.
Theres also some programming languages that do this "on the fly", like Amiga Basic. They use a so called "Interpreter" but are usually much slower than compiler-based languages. :sleep

good luck experimenting ;)

Tolismlf
21 November 2004, 13:40
Thanx very much. I am trying to use Storm C demo but i can't compile anything (Amiga sources). Instead i am using Dev C++ in Windows and it seems OK (using Windows source codes for compiling).
:great

HCF
12 December 2004, 09:13
Thanx very much. I am trying to use Storm C demo but i can't compile anything (Amiga sources). Instead i am using Dev C++ in Windows and it seems OK (using Windows source codes for compiling).
:great
Well, you need to find compatible source code...Like on the PC, the Amiga suffers due to the differences between the compilers and of course then there is the architecture which is different from a PC, therefore Windows source code won't work on the Amiga and vice versa (not sure if that's what you're talking about ?!)
Try to download a good compiler, which might depend on the system you are using...You could even try Commodore's Lattice C Compiler that came on one disk if I remember correctly...Don't use a demo version if you can avoid it since a lot of the time features might be disabled that you'd expect to be there...Good luck !!