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

3 posts / 0 new
Last post
kaarlo52
kaarlo52's picture
Offline
Last seen: 3 months 3 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: 3 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

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Hans
Hans's picture
Offline
Last seen: 3 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

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Log in or register to post comments