User forums => Using Code::Blocks => Topic started by: tejashs on February 14, 2011, 02:34:51 am
Title: executables when compiling C++
Post by: tejashs on February 14, 2011, 02:34:51 am
Hello guys i am just learning C++. I am using the latest code::blocks 10.05, and when compiling c++ files i noticed that all the executables were more than 900Kb in size even though it is only a hello world program. Is it only my problem or is it the normal behaviour.
Title: Re: executables when compiling C++
Post by: MortenMacFly on February 14, 2011, 06:28:35 am
Normal. Play with the compiler options to reduce size.
Title: Re: executables when compiling C++
Post by: tejashs on February 14, 2011, 12:48:30 pm
Code
#include <iostream> int main() { std::cout << "hello world"; }
this is the code used and after trying optimizations for size,(888Kb to 457Kb) it reduced by half can i further reduce it by any means
Title: Re: executables when compiling C++
Post by: MortenMacFly on February 14, 2011, 04:38:41 pm