Hi all. I just downloaded a C compiler called MinGW. I've installed it and now I'm not sure of what to do? Can someone pls help me with step by step instructions? I'm using XP btw...Thanks!
Three answers:
JD
2007-10-04 13:41:02 UTC
Create a c program in your favorite text editor something like this:
#include
int main(int argc, char** argv) {
printf("Hello, World\n");
return 0;
}
Save this to a file such as main.c
then to compile the file type: C:\MinGW\bin\gcc -c main.c
this will generate a main.o file. Object file.
then link the object file to create an executable like this:
C:\MinGW\bin\gcc -o main.exe main.o
and you there you have it a main.exe
more info here http://www.mingw.org/docs.shtml#compilingandbuilding
JCS
2007-10-04 12:56:07 UTC
Here you go:
http://www.bloodshed.net/devcpp.html
This uses MingW I believe except it had an IDE front end. When I used to program in C / C++ This is what I used in windows.
KarenL
2007-10-04 12:55:26 UTC
Sorry to hear you are using XP. Install LINUX (SUSE UBANTU) and you will not only have some excellent secure, opensource tools, you will also have many examples of C code to examine.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.