I just need a Windows C compiler. I need something that I can install that can put a function into the command line and I can type in a command from anywhere in the command line prompt and compile a program. I was really rambly, there.

12-05-2011

mdj441

You mean something where you can just

Code:

compiler mycode.c -o myprog.exe

?

Though most people would recommend Visual Studio or Pelles C, you might consider TCC if you're just looking for a simple, easy-to-use command line compiler.
You could also look up MinGW/gcc, which are more popular and probably more useful in the long run.

Whatever compiler you pick, though, all you have to do is add the directory it's in to your PATH environment variable to be able to use it from anywhere (something like Control Panel->System->Advanced->Environment Variables).

12-05-2011

CommonTater

Quote:

Originally Posted by Gigabitten

I just need a Windows C compiler. I need something that I can install that can put a function into the command line and I can type in a command from anywhere in the command line prompt and compile a program. I was really rambly, there.

Trust me on this... you're gonna get real tired of working from the command line real fast... You will begin to crave an IDE with syntax highlighting and such very early in the process. You will also want the convenience of button click compile and run as well as the benefits of customized editors and such.

Go get yourself Pelles C... either 32 or 64 bit version, as appropriate to your version of Windows. As soon as you install it, open the help file... you will find it has both a wonderful IDE and a comprehensive set of command line tools as well.

But I'd bet real money you won't be doing command line compiles after you see what the IDE can do for you.

12-05-2011

Salem

Later on, CT will complain that you jumped to IDE's too soon, because they hide all sorts of implementation detail about how compilers and linkers work.

This will come to the fore when you ask how to add a library to your project (which is falling off a log easy from the command line, but can be an obscure PITA within an IDE).

12-05-2011

CommonTater

Quote:

Originally Posted by Salem

Later on, CT will complain that you jumped to IDE's too soon, because they hide all sorts of implementation detail about how compilers and linkers work.

This will come to the fore when you ask how to add a library to your project (which is falling off a log easy from the command line, but can be an obscure PITA within an IDE).

What is your problem?
You having a fight with the wife and taking it out on me or something?

GEES!

Most IDEs make adding libraries painfully simple... in Pelles you just list it on the linker tab and add it's path to the linker's path... easier, in fact, than doing it from the command line.

12-06-2011

cyberfish

Quote:

Most IDEs make adding libraries painfully simple... in Pelles you just list it on the linker tab and add it's path to the linker's path... easier, in fact, than doing it from the command line.

Really?

Code:

gcc ... -lmylibrary

12-06-2011

CommonTater

Quote:

Originally Posted by cyberfish

Really?

Code:

gcc ... -lmylibrary

Really... In the IDE I add it once and it's saved with the project settings. As I work through my project doing test compiles and debugging, I only need to click the "build" or "run" button and it's all nicely done for me. From the command line you get to type that and considerably more alphabet soup *every time you compile the program*... thousands of times for some more complex projects.

Yes I know about makefiles. No I don't shy away from using them... It's just that with a proper IDE you don't need them!

An IDE is a tool, just like any other. It helps you accomplish certain tasks... Given the benefits of syntax highlighting, brace matching and more... there's no good reason not to use one... well except for the old-school snobbery about "real programmers" ... This notion that a trade should involve hardship is beyond silly.

@Salem .... well done! You've managed to set off one of the oldest and stupidest debates in programming...

12-06-2011

laserlight

Quote:

Originally Posted by CommonTater

Really... In the IDE I add it once and it's saved with the project settings. As I work through my project doing test compiles and debugging, I only need to click the "build" or "run" button and it's all nicely done for me. From the command line you get to type that and considerably more alphabet soup *every time you compile the program*... thousands of times for some more complex projects.

Yes I know about makefiles. No I don't shy away from using them... It's just that with a proper IDE you don't need them!

On the other hand, with suitable command shell, a text editor suitable for programming (with syntax highlighting, brace matching and more), a debugger, makefiles/build scripts and other tools, you don't need an IDE... although in reality what happens is that the whole command line-based development environment setup has been custom integrated by the developer to become an IDE that isn't called an IDE :)

12-06-2011

CommonTater

Quote:

Originally Posted by laserlight

On the other hand, with suitable command shell, a text editor suitable for programming (with syntax highlighting, brace matching and more), a debugger, makefiles/build scripts and other tools, you don't need an IDE... although in reality what happens is that the whole command line-based development environment setup has been custom integrated by the developer to become an IDE that isn't called an IDE :)

Like you said... it's not called an IDE but that is what it amounts to.

POIDE is one of the big reasons I've stuck with Pelles C all these years... it's a definate keeper, very complete.

But then, those who do everything at the command line are welcome to it...
I suppose there are masochists who pound code and that would be right up their alley...

12-06-2011

Salem

No, there are far more stupid debates you can get involved in if you want.

And FWIW, knowing how the tool chain works under the hood is really important to know.

12-06-2011

CommonTater

Quote:

Originally Posted by Salem

No, there are far more stupid debates you can get involved in if you want.

And FWIW, knowing how the tool chain works under the hood is really important to know.

And you think that using a convenient tool somehow magically prevents people from understanding?

So in reality this...

Quote:

Originally Posted by Salem

Later on, CT will complain that you jumped to IDE's too soon, because they hide all sorts of implementation detail about how compilers and linkers work.

Should have read... "Later on I will complain..."

You're one very strange dude my friend...

12-06-2011

Gigabitten

Geez! I left for one day and you already have a full-on debate going! Not bad! Thanks for the tips, guys.

12-06-2011

Gigabitten

By the way, how do you mark a thread as solved?

12-06-2011

cyberfish

We don't usually do that here, but maybe change the thread title? (can you even do that?)

12-06-2011

brewbuck

Nothing wrong with an IDE, it's just that if your code is only buildable from the IDE then it's only as portable as the IDE.