| |
|
Welcome to AstaHost - Dear Guest | |
Programming C In Windows
#1
Posted 02 February 2008 - 07:58 PM
I need to find a compiler for Windows that will compile the C language. I have tried Microsoft Visual C++ Express 2008 but I find it to be way too bulky and hard to use. The command-line compiler is similar to gcc I guess, and it creates executable files for Windows, but the compiler in the actual program compiles C++ but not C for some reason. And it will only compile files in projects, not standalone files. In my opinion, this is not such a great product.
Where can I find a free C compiler for Windows?
Second question: How do you program a GUI? It would be nice to have a GUI to run the program, not just command line stuff.
#2
Posted 02 February 2008 - 08:35 PM
Look also here : http://www.delorie.com/djgpp/
and also here : http://gcc.gnu.org/i...l/binaries.html
and of course http://www.google.fr...2...nload&meta=
#3
Posted 02 February 2008 - 08:49 PM
Maybe it's time to consider another language. When Kernighan and Ritchie originally developed C in 1978, it was considered functional, but low level. Now, it is the primary alternative to assembly language. Writing a GUI in it is very error-prone. That is why languages like C++ were developed, but they have complex syntax and a number of "gotchas" that make minor errors very hard to find.I need to find a compiler for Windows that will compile the C language. ...
Second question: How do you program a GUI? It would be nice to have a GUI to run the program, not just command line stuff.
I do almost all my programming in Python. It is free, open source and exceptionally easy to learn. It is also licensed so that you can develop software and sell it commercially -- it is not GPLed. It has many GUI Frameworks that will run on Windows and Linux as well. Install the appropriate Python compiler and extensions on your favorite system, and the code you develop on one system will run on others.
As an illustration of how Python has major advantages, consider the market application TeleChart. It has a "Developer's Kit" which is intended to be accessed from Visual Basic or Visual C++. I am calling it from Python. My program also spawns GUI subwindows using Tkinter and Python megawidgets. Programming a GUI system in Windows (or Linux for that matter) is very complex, because there are literally thousands of system calls, and mastering them is best avoided by using a toolkit that is adapted to your application. Just mastering the toolkit will require days, if not weeks.
Hope this helps!
#4
Posted 02 February 2008 - 09:38 PM
As for C++, don't you need to learn C before learning C++?
#5
Posted 03 February 2008 - 03:44 AM
Nothing except what comes with the python installer. It is fully functional as a standalone package. (Of course it requires an operating system.) I just took a look at my Python 2.5 installation. It includes several add-ons, and occupies 49.1 MB on my hard drive. The .msi (compressed) installer of Python 2.5 is just 10.2 MB. If you want one that talks with .NET, IronPython is available. As another alternative, if you want it to generate pure Java code, try Jython.Ok I've heard of Python before but do end-users need to download some software before running the software ...?
Also, is it possible to develop FREE software with Python, not just commercial software?
As for C++, don't you need to learn C before learning C++?
Of course, you can develop free software. Most of the apps are. But you are not forced to. Python used to have a lot of testimonials from people in various businesses. I just did a search and found one: Industrial Light and Magic. There were so many more, including Google, that the Python website has buried them. The original inspiration behind Python was Guido van Rossum. Python is so important to Google that they have currently employed him to extend the development of Py 2.5 to Py 3.0, including extensions that matter very much to them.
C++ is a "wrapper" for C. Technically, the C++ engine is a macro processor that takes C++ source code as input, and generates C code, which makes use of a lot of functions from libraries that are used specifically to facilitate higher-level operations for which C++ is intended.
#6
Posted 03 February 2008 - 12:00 PM
And I think that C programming is sometimes a must for serviceability purposes.
If you write down a program for somebody else, it can be maintained by any guy who learned C programming at school, and there are lots around the world.
So, the first step in a self-training plan should really, in my opinion, starting with C on any hardware you have, Windows if it's your current Operating system.
When talking with other people in your profession life, first say "I propose you to start developping the thing programming in C", and then you add "a nice alternative would be using Python but I must warn you that I will be the only guy able to help you for future software evolution".
#7
Posted 03 February 2008 - 07:22 PM
Point granted. And you provided him with multiple links for compilers, which was his first request. Maybe I should have left it at that...The topic starter post was a question about C programming.
But the initial post continued with "Second question: How do you program a GUI?..." Have you ever tried constructing a GUI in C? I actually have, but the effort didn't last very long. Many too many misunderstood structures, incorrect pointers, and other things that are very difficult to find in C, unless you're using and IDE with a debugger, and I haven't found one of those that doesn't cost real money.
Have you found a good IDE C system? Your link to DJGPP looks like a possibility, but I've never seen DJGPP before. Is it usable for GUI development?
Another possible choice for C is MinGW. I haven't used it for a decade, but it turned up in the google search you posted, and it certainly has a lot of development behind it.
#8
Posted 03 February 2008 - 08:04 PM
No, no, please no. And, yes, I muss confess, I just wanted to have fun with polemics. However, your way of thinking is very interesting, I thing it's the best way, looking at the future and looking if things are useful instead of seeing if they are used.Maybe I should have left it at that...
and, no, I did not test the C compilers by myself, because I am currently working under AIX so I use gcc or the manufacter's C compiler.
#11
Posted 18 December 2008 - 05:24 PM
You will have to add `extern "C"` declare statement or name all code file with the extension .c such as string.c.
For instance,
#ifdef __cplusplus
extern "C" {
void printchar();
void printchar()
{
printf("I'am printchar");
}
} /* extern "C" */
#endif /* __cplusplus */When it is time to complier the code files.
You will notice that the visual studio program group has an item call visual c++ 2008 command prompt.
This prompt will define all system enviroment variables such as lib, include ... etc so that the compiler will
found all c include files like stdio.h ... etc.
About the GUI programming.
You may try WTL (Windows Template Library 8.0) or Wxwidget.
---
Blueray
#12
Guest_(G)StanB_*
Posted 15 March 2010 - 08:29 AM
#13
Guest_(G)_*
Posted 09 July 2011 - 04:48 AM
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











