There is a difference of size in the executable file when i compile the code with gcc (using the terminal) and eclipse cdt.gcc 8kb and eclispse 27 kb.why does it happen? Isn’t the eclipse using the same gcc compiler that was preinstalled?. The program is very simple ,but would it make significant size increment for larger code and compromize program performance ?
Share
Yes, Eclipse is using the same
gcc. However, it’s likely that Eclipse add to the binary file some information for its debugging. For example, it’s likely that Eclipse runsgccwith-goptions which will include inside the binary the whole source code. This can result in very big difference about executable size.For example, try to compile this simple program:
Try with:
Of course, different
gccoption may result in different size.