I am looking for a command line compiler to use at the university for variuos projects. I have tried Cygwin and MinGW but I couldn't get them to work properly...any one know any good command line compilers and linkers for Windows?
Printable View
I am looking for a command line compiler to use at the university for variuos projects. I have tried Cygwin and MinGW but I couldn't get them to work properly...any one know any good command line compilers and linkers for Windows?
All compilers can be used from the command line - the IDE just does the command line for you.
Yes but do you know any free for Windows?
Microsoft offers the command line version of their 7.1 tools for free, search the forum.
I downloaded the Visual C++ Toolkit 2003.(Can it work with ANSI C?)
Also, how do you tell it where the include dir is, since i'm getting errors of it not finding header files?
cl /?
should give you a list of all compiler switches, including how to set the include dir. In addition, I think the INCLUDE environment variable is used for looking up include directories, and the LIB envvar for static libraries.
It can handle ANSI C89, not C99.
I have tried that, but either i'm blind or it isn't there :D
It's under the preprocessor section of /?, in the right column. /I is the switch you need.
It still won't compile it. Giving me an Access Denied error
Code:cl /I <C:\program files\Microsoft Visual C++ Toolkit 2003\include> main.c
You have to use " for quoting, < and > are for redirection.
By using only the " gives me the error on missing headers
Which headers? For windows.h and related, I think you have to install the Windows SDK separately.
If you want to compile as C code, pass the /TC option to the compiler. I think C++ (/TP) is the default.
I was trying to compile a simple hello world program using iostream.h, but I'll try the /TC option.
The VC++2003 compiler no longer includes the non-standard .h C++ headers, use the non-.h versions:
#include <iostream>
Don't forget about the namespace std.
thanks ;)