Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: kaarlo52 on January 03, 2024, 08:46:14 AM
-
Why is my Hello C++ program 6 MB big?
I installed Windows cross-compiler adtools on Cygwin.
And compiled simple c++ program:
"ppc-amigaos-g++ -athread=single helllo.cpp -o hello"
At least it works.
Here are the instructions:
https://os4coding.net/blog/kas1e/how-build-amigaos4-cross-compiler-binutils-2232-gcc-830-cygwin
I had to use Hyperion SDK 53.30 in native-build makefile SDK_VERSION to build it.
-
Could it be that to make this a stand alone executable, extra stuff has to be compiled into the program? So that any system can run it? Not done any C coding. But seem to recall back in my PASCAL coding days that this was a thing when you compiled.
-
I've never buildt for OS4 (I think), so I don't know if this is relevant, but... have you tried "strip hello" to remove the symbol table etc?
-
ppc-amigaos-strip.exe worked. Now the executable size is 690 KB.
Thanks.