There are lots of assemblers. Each of them has it's own features. Like MASM-can link libs, GoAsm-unicode support.. etc... What I want to know is that, which C compiler is the "best" one to use? What does compiler X have that compiler Y doesn't?
:D
:D
Visual C++ 2003 (or more recent) is one of the best compilers for x86; it's very standards-compliant and has a very good optimizer. You can get it for free (with a even more free license than MASM) from Microsoft, http://msdn.microsoft.com/visualc/vctoolkit2003/ . Other than that, there's the intel C++ compiler which is very good, but not free. Gnu GCC is shaping up in recent versions, but it's a bit "queer" in some ways. If you don't feel like going for the very best compilers :), you can check out Digital Mars, Pelles C, or lcc-win32. The latter two don't have C++ support.
Thanks, f0dder! You're always the first one to answer my questions.. hehe.. ;) Anyways, gonna try the one from microsoft.
:D
:D
Hi audioman,
If you are looking for a nice IDE, have a look at Pelles C
If you are looking for a nice IDE, have a look at Pelles C
Does the free version from microsoft have an IDE?
No, it just has the compiler . Fortunately, KetilO's adding C/C++ support for RadASM
I have problems compiling this messagebox example. It seems that I have files missing from the vctoolkit2003. Files like, windows.h.. etc..
Ah yes, the SDK was missing there (.h and .lib for Win32API) . In the worst case, you can get them from DevC++ (I haven't read the licensing there, so I'm not very sure if it's OK). The last version of DC++ has a good editor - yet I've tried it only at uni.
audioman,
If you can manage the large download, get the current PLATFORMSDK and use the CC++ headers from there. Add them to the C libraries that come with the VCTOOLKIT2003 and you can do many things.
If you can manage the large download, get the current PLATFORMSDK and use the CC++ headers from there. Add them to the C libraries that come with the VCTOOLKIT2003 and you can do many things.
hi hutch--,
where can i get this platformsdk?
EDIT: Nevermind, I found it. Didn't download it coz I have only a dial-up connection. Anyways, I need free C++ compiler. Im trying Dev-C++ now.
EDIT2: Any knows how to use wcrt/libctiny with Dev-C++?
where can i get this platformsdk?
EDIT: Nevermind, I found it. Didn't download it coz I have only a dial-up connection. Anyways, I need free C++ compiler. Im trying Dev-C++ now.
EDIT2: Any knows how to use wcrt/libctiny with Dev-C++?
audioman,
I hooked the first version I had on dialup. Trick is to run the download when you are not sitting at your computer waiting for it. Its about 32 meg last I looked so if you get the download going then go and have a feed or go somewhere for a couple of hours, you will probably get it with no problems.
I hooked the first version I had on dialup. Trick is to run the download when you are not sitting at your computer waiting for it. Its about 32 meg last I looked so if you get the download going then go and have a feed or go somewhere for a couple of hours, you will probably get it with no problems.
PlatformSDK is pretty huge - the ancient October 2002 edition is ~412 megs in full download. But, if you use the selective install, you can download "just" the CORE SDK, which is a lot less. But still, with dialup... eek.
What about MinGW? I switched from VC Toolkit to MinGW, and I must say that I'm realy impressed. I think it's a lot more better than VC++ Toolkit. It can produce better codes than VC, it has much more optimization options, etc.
As for an IDE there is DevC++, and my preferred one: Code::Blocks, a relative new project, but very promising, and handy. Both supports MinGW and VC Toolkit too.
As for an IDE there is DevC++, and my preferred one: Code::Blocks, a relative new project, but very promising, and handy. Both supports MinGW and VC Toolkit too.
MinGW is pretty nice, I use it over VC(anything).
It can produce better codes than VC, it has much more optimization options, etc.
In my experience, VC2003 usually produces better code than GCC (which is used in MingW) - except for a few rare cases. I haven't played with GCC 4.0.0 yet, though.
VC++ is nice, but for my work I need more flexibility in controlling the output of the linker, thus I use GCC since I can control the linker's behaviour through linker script or pass the linker command through a makefile. Anyway, does VC++'s linker also has this flexibility ( I mean sort of linker script) or it's hidden somewhere a.k.a undocumented ? I've been playing with the Visual Studio IDE to pass linker commands to the linker :).
In my experience, VC2003 usually produces better code than GCC (which is used in MingW) - except for a few rare cases. I haven't played with GCC 4.0.0 yet, though.
You know... MS VC Toolkit puts a lot of waste in the code, which I don't like. It's strange that the same compiled code gets significant smaller with MinGW. (Both without debug info of course). I don't know... maybe in your case VC2003 produced better results, but I used it for some mathematical calculations, and I was realy satisfied, and I like the fact, that under MinGW I can explicitly specifiy the different kind of optimisiations.
It's a little bit ridiculous the optimize for speed/size kind options, without knowing what they do in reality.
I've used MinGW3.1, but now I'm using MinGW3.2 (GCC 3.4.2 - the candidate package).
And don't forget: with GCC you can compile a code just for a certain architecture, it realy useless to compile a program to be back compatibile for a Pentum I / 386 also. That's the big disadvantage of MS compilers. You can put P4 optimizations, but the compatibility will remain. (As far as I know.) For an application, where the running time realy matters this counts a lot.
So it's kinda bizarre... everybody have P3/P4/Athlon computers and we run programs on them compiled for the Pentium I architecture (which is very different).
I think it should be binary distro's for different architectures... For example Windows XP compiled explicitly for P3, for P4 etc. I believe we would realy feel the performance boost.
Writing mixed model code has always had that problem but the cost if you build late model hardware only code your code will not run on the vast majority of computers. If you want the maximum advantage from code for different hardware, you need to do a processor detect and run the code best suited for that processor. This means at least a couple of different speed critical algos, integer for PI and earlier, MMX for PII and sse for PIII, sse2 for PIV.
Ususaly you settle for integer code that is properly optimised for older hardware and SSE2 for the late stuff.
Ususaly you settle for integer code that is properly optimised for older hardware and SSE2 for the late stuff.
bszente,
Depending on the source code, you can get small C executables of a minimum 1 Kb. The trick is to avoid standard C run-time startup codes. Have a look at this thread for full information:
Tiny C startup module to build smaller C executables
http://www.masmforum.com/simple/index.php?topic=166.0
Depending on the source code, you can get small C executables of a minimum 1 Kb. The trick is to avoid standard C run-time startup codes. Have a look at this thread for full information:
Tiny C startup module to build smaller C executables
http://www.masmforum.com/simple/index.php?topic=166.0
You know... MS VC Toolkit puts a lot of waste in the code, which I don't like. It's strange that the same compiled code gets significant smaller with MinGW. (Both without debug info of course).
Do you mean the actual code generated, or the exe size? Because the VC Toolkit creates statically linked executables (by default), and MinGW dynamically linked, which might be the difference you saw.