What applications, special compilers do I need to make a GUI interface in C coding?
What applications, special compilers do I need to make a GUI interface in C coding?
No special compiler needed. You may need some extra tools such as a "resource editor" [that is what you use to design dialogs, icons, menus etc].
Which architecture is this for?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Windows Vista.
What are some good free 'resource editors' ?
Get Visual Studio express - it comes with a good resource editor, compiler and IDE. It's in my opinion the best IDE for Windows.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Thanks again Mats
Will Visual C++ compile C as well?
Yes, but you have to set it to compile the code as C code (otherwise it will happily compile C code that is valid C++, but may choke in cases where C and C++ differ, and produce object code with C++ name mangling). If I remember correctly (but I may be wrong), there is limited or no support for new features introduced in C99.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Actually, it chooses "intelligently" based on the filename. If you call a file "something.c" it compiles as "C", if you choose the name "something.cpp", it will compile as C++.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Also if I'm not mistaken (and I very well could be. :P) using the CL command from the visual studio command prompt compiles C code, at least it doesn't seem to compile any of my C++ code.
Why would you want to write a Windows program in C instead of C++?
Because? There's no reason not to use C, after all the Win32 framework is written in C.
If you write it in C++ and plan to have an OO program, you have to create classes that essentially wrap the precedural Windows API functions anyway. You also have to use char arrays (or similar) instead of std::string when using buffers with the Windows API functions that require them. My point is that even if you decide to make an OO framework, you still have to write a relatively decent amount (depending on the size of your framework/program I suppose) of C-style code anyway to glue your OO stuff to the procedural style of the Windows API.
Essentially, depending on what you want to do, you can write Windows GUI code in either C or C++. It doesn't matter how you interface with the API or with your program, except with whatever is easier to write for and interface with from your own perspective.
Last edited by MacGyver; 11-22-2007 at 07:39 PM.
Preferance, I guess. I can't see how someone wants to write a C program seeing how it lacks OO and good functionality such as smart pointers, vectors, etc.