Ok for those of you who are C++ programmers help please!
I'm using Dev-C++ to compile some small C++ programs (no more than 50 lines or so) and when I compile the project i get huge exes like 400kb.
Even small programs such as
Now googling it I've found that not including the debug info cuts it down to 220 or so and then enabling strip executable and best optimisation cuts it by 5kb or so again. Still too big.
I found that this is to do with the MingW or Gcc compiler statically linking to <iostream>
Thing is I've read that you shouldn't really use iostream for small programs and only use libs such as stdio etc. I've tried including them instead but the cout and cin functions don't work. I'm pretty much a n00b to c++ so I'm not sure.
I've read most of the FAQs to this subject and non seem to really break the exe to 5kb size range.
Any help please?
I'm using Dev-C++ to compile some small C++ programs (no more than 50 lines or so) and when I compile the project i get huge exes like 400kb.
Even small programs such as
Code:
#include <iostream>
using namespace std;
int main(void)
{
cout << "Filetest" << endl;
return 0;
}
Now googling it I've found that not including the debug info cuts it down to 220 or so and then enabling strip executable and best optimisation cuts it by 5kb or so again. Still too big.
I found that this is to do with the MingW or Gcc compiler statically linking to <iostream>
Thing is I've read that you shouldn't really use iostream for small programs and only use libs such as stdio etc. I've tried including them instead but the cout and cin functions don't work. I'm pretty much a n00b to c++ so I'm not sure.
I've read most of the FAQs to this subject and non seem to really break the exe to 5kb size range.
Any help please?