Why is my Hello C++ program 6 MB big?

3 posts / 0 new
Last post
kaarlo52
kaarlo52's picture
Offline
Last seen: 11 months 4 weeks ago
Joined: 2023-12-17 18:09
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.

Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: Why is my Hello C++ program 6 MB big?

Did you use C++'s streams by any chance (e.g., cout << "Hello World")? If so, then that's probably why. The C++ streams library is rather bulky.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: Why is my Hello C++ program 6 MB big?

I see you asked the same question on amiga.org, and kolla asked if you had stripped the binary (of debugging info). Yes, unstripped binaries are huge.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

Log in or register to post comments