3 questions about MinGW

Started by
3 comments, last by V3rt3x 21 years, 4 months ago
Hello! I've recently migrated from VC++ to MinGW (to try!) and I have 2 questions : 1) I would like to understand why when I build an exe with VC++ which is about 24 Ko, the same is more than 430 Ko with gcc! (this when I use iostream, with printf() this is about 22 Ko) 2) I've the Warning "no new line at end of file". Why this is important for gcc ??? thx. [edit: third question ;p] 3) My program is composed of 3 files: main.cpp, bitmap.cpp and bitmap.h. main.cpp includes iostream, iomanip, fstream, string, time.h and "bitmap.h". bitmap.cpp includes fstream and "bitmap.h". bitmap.h includes nothing. there is no include of a windows file header anywhere. However, when I put the definition of tagBITMAPFILEHEADER, tagBITMAPCOREHEADER or another struct from wingdi.h, I get an error that it was already defined in wingdi.h! Where does it come from? Is wingdi.h always included with mingw??? (I wish someone understand me :F My english is not very good) [edited by - V3rt3x on December 6, 2002 4:05:42 PM] [edited by - V3rt3x on December 6, 2002 4:23:14 PM]
Advertisement
1) Dynamic linking.
2) It shouldn''t break anything but it''s rude to have text files with no trailing newline.

char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
ok but how can I reduce the executable size?
Use the optimization switches.
And optionally, strip your executable.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement