Topic: "C and C++ compiler" (page 1 of 1)

1
Author Post
unknown user
HI folks. What compiler in your opinion is the best for C and Perl language?
EMail
unknown user
Personally I have used MSVC, Borland and GNU. People always slate MSVC for being slow and producing large executables but to be honest it is probably their lack of understanding - I've produced smaller and faster executables than Borland or GNU. If you're using windows then GNU is useless imho. MSVC has a nice IDE and better debugging facilities than either Borland or GNU. People will argue about ISO compliance and MSVC is the least compliant of these compilers - and none of them is 100% compliant - but I suspect most people never run into the problems associated with ISO compliancy.
EMail
Dreamcatcher
groupmaster
If you dont feel like downloading large files ore paying big amounts of money i suggest Bloodshed DeV-C++ this will compile both C as C++ and its small and freeware, easy in use. It has less options then the bigger compilers then the microsoft and borland vompilers but it also makes it more easy to start with
private message EMail
unknown user
then maybe you know a trick to reduce the amount of garbage that msvc puts into my files :/
EMail
unknown user
try this:
1. compile it as the release version.
2. add the following:

#pragma comment (linker,"/ENTRY:main /FILEALIGN:0x200
/MERGE:.data=.text /MERGE:.rdata=.text
/SECTION:.text,EWR /IGNORE:4078")

(should be one line)
EMail
unknown user
#pragma comment (linker,"/ENTRY:WinMain")
spared me 20% :thumbsup:
.. but now it only starts in the debugger lol
EMail
unknown user
well, you shouldn't use winmain if you want it to be small.

if you want more details then read

Creating small executable files with VC++
By: Pegasus


EMail
unknown user
ok i tried the main thing, played with the project options and replaced the only call to atoi with StrToInt and now its 3kb instead of 24kb :>
EMail

Topic: "C and C++ compiler" (page 1 of 1)

1