Win32 C Compiler

Programming, for all ages and all languages.
Post Reply
Midas
Member
Member
Posts: 140
Joined: Sat Jun 24, 2006 4:40 pm
Location: Falkirk, Scotland
Contact:

Win32 C Compiler

Post by Midas »

DJGPP doesn't support Win32 apps - so does anyone know of a C compiler that supports Win32? I want to start playing with the Win32 API but without the overhead of dealing with C++ (which I'm still in the process of teaching myself) so that I end up learning two things simultaneously.
Regards,
Angus [Óengus] 'Midas' Lepper
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Win32 C Compiler

Post by Candy »

MingW32 with Dev-C++ and WxWindows. Also you could try Visual C++ Express, if you like vendor lock in.

Note that both also support C, as per requirement from the C++ spec.
Midas
Member
Member
Posts: 140
Joined: Sat Jun 24, 2006 4:40 pm
Location: Falkirk, Scotland
Contact:

Re:Win32 C Compiler

Post by Midas »

Ah, I have Visual C++ Express - I just assumed it would only compile C++. Which can, obviously be C-like but having run into the differences more often than seems entirely healthy, and assuming it didn't compile C, I'd steered well clear. That's good to know, thanks Candy!

I actually quite like the VS IDE, so I'll stick with it.
Regards,
Angus [Óengus] 'Midas' Lepper
ark

Re:Win32 C Compiler

Post by ark »

It's worth pointing out that even with Visual C++ Express there's no real vendor lock-in if you're using the Win32 API directly and not some API that is not so readily available like MFC. The mingw compiler I believe comes with an independently-created set of Windows header files which work very well unless you're trying to do something that they haven't had a chance to cover yet (I seem to remember needing a monitor function but not being able to access it from their headers) - even if they don't cover it, though, you can always pull a function directly from the DLL where its code resides.

As long as you don't write your app to target the CLR and stay away from the C++ / CLI aspects of the IDE, you should be fine. Also worth noting is that the Express edition of Visual C++ doesn't come with a resource editor, so that means doing resource scripts by hand, which isn't terribly pleasant. But then unless you get a commercial version of Visual C++, it doesn't change anything, as I don't believe mingw comes with any kind of resource editor, either.
Bob the Avenger

Re:Win32 C Compiler

Post by Bob the Avenger »

Personally, i use DEV-C++ as my editor/IDE for everything appart from compiling my os, where i use my gcc cross compiler in cygwin

Peace
earlz

Re:Win32 C Compiler

Post by earlz »

meh I use Code::Blocks as an ide to compile everything, using like 3 compilers if needed
it supports gcc, watcom, microsoft, digital mars, and SDCC(no idea on that one)
it lets you control just about anything you can imagine in the building process, therefor makign it the only ide I've seen that can easily compile an OS
Bob the Avenger

Re:Win32 C Compiler

Post by Bob the Avenger »

DEV-C++ can be made suitable to compile an OS fairly easy, but i'm too lazy to look into how its done

Peace
Midas
Member
Member
Posts: 140
Joined: Sat Jun 24, 2006 4:40 pm
Location: Falkirk, Scotland
Contact:

Re:Win32 C Compiler

Post by Midas »

I believe, although I may be wrong having never personally used it, that you can change the compiler/compile command string on DEV-C++ to whatever you like so you can use GCC with all your command line options etc.
Regards,
Angus [Óengus] 'Midas' Lepper
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Win32 C Compiler

Post by Candy »

Jordan3 wrote: and SDCC(no idea on that one)
Small Devices C Compiler, for devices with between 16 and 384 bytes of memory.
Post Reply