View Full Version : C compiling


Pi-Sudoku
09-09-06, 06:01 AM
hello, i am learning C.

I downloaded a C and C++ compiler and and trying to created .exe programs.

The compiler i have only seems to give me .C files when i click "compile"

Do i need another program to create .exe files? and if so is the proram i have any better than a text editor?

RickyH
09-09-06, 06:44 AM
Visual basic

Pi-Sudoku
09-09-06, 07:04 AM
I don't like the idea of VB, for a start i cant find any compilers for it other than Visual Studio and i'm not paying £200 when there are loads of free ones for C and C++

przyk
09-09-06, 07:35 AM
I downloaded a C and C++ compiler
Which one?
The compiler i have only seems to give me .C files when i click "compile"
It's possible that you got an integrated development environment without a compiler included, or that it can't find the compiler. You might have to add its location to your PATH environment variable.

Pi-Sudoku
09-09-06, 09:11 AM
i downloaded this one (http://www.bloodshed.net/dev/devcpp.html)

przyk
09-09-06, 09:53 AM
Try opening an MS-DOS window and typing "gcc". If you get a message along the lines of "gcc: no input files" you can use gcc to compile your C programs. If gcc can't be found, try running a search on your computer's hard disk for "mingw" or "gcc". If you find an installation of mingw, and it contains a folder (probably called "bin") with a bunch of exe's (including gcc), the problem is most likely that the bin directory isn't on your path.

Pi-Sudoku
09-09-06, 10:39 AM
i have a folder called mingw32, in it is a folder called bin and within that are about 10 exe's none of them are called gcc though

RubiksMaster
09-09-06, 12:23 PM
I used Dev-C++ for a while, and it worked fine for me. In your program preferences, there might be an option that can tell the integrated development environment (IDE) where to look for the compiler exe. It would probably also work to put the path in your environment variables.

Blindman
09-10-06, 12:24 AM
Try C# express from microsoft. Its free and the most advanced IDE on the market.

AntonK
09-12-06, 11:26 AM
The question you really have to ask yourself is 'Do I want a compiler or do I wanted a development environment?'

With a development environment you'll find that programming is a lot faster. Often you can rapid prototype ideas in minutes. However, you'll most likely also be tied into a framework and system that is very un-portable.

With a compiler on the other hand it does NOTHING for you except compile. But its simple clean and most likely if you program correctly your code will also be extremely portable.

Now for my personal opinion (since you have asked for them). Do not go with Visual Basic. There was a time when Visual Basic was a contender. It was quick, easy, cheap and you could make real applications. This time has past. As Blindman has said, with the introduction of Visual C# (specifically the free version C# Express) you have ALL the power of Visual Basic with almost none of the down sides. Unfortunately with any Microsoft programming environment like that when you compile you don't really compile. It compiles into something called CLI which is then run on their virtual machine (called CLR). In this respect it is VERY much like Java.

I would take the time to learn to program with just a compiler. Download MinGW or the GNU tools for Cygwin and learn some low level C. Then perhaps some scripting languages, and then you'll find that you have the ability to do low level systems programming AND higher level application development with systems like C#. This is of course just my recommendation.

-AntonK

Blindman
09-12-06, 07:56 PM
I should point out that the only difference between C# and VB.Net is the syntax, they both compile into the same op codes, use the same object libraries, and run at similar speed (depending on how you code it). Both Languages are true object oriented languages.

C# is truly language independent, an application can be written with code from C++,VB,JScript,Pascal and even native assembly

As for cross platform support the concept behind DOTNET is to be platform independent. Final compilation is done at run time and thus is able to run on any platform that provides the framework you are using. The are several virtual machines available for Linux that allow you to run dotNet application on Linux platforms (god knows why you would want to do that).

If you also Download XNA from Microsoft you can also develop for the XBox360 using C# express (all hail MS for providing the first development environment for a popular game console for FREE)

C is something you would only use for embedded systems like your washing machine. Don't waist your time with it unless your into robotics or the like.

superluminal
09-12-06, 08:01 PM
C is something you would only use for embedded systems like your washing machine. Don't waist your time with it unless your into robotics or the like.
Hey! Embedded systems run your world buddy. Show some respect. :D

przyk
09-12-06, 08:32 PM
Don't waist your time with it unless your into robotics or the like.
The irony here is, (after Assembly,) C is the language to use if you don't want to waste your CPU's time.

Blindman
09-12-06, 08:38 PM
C is the language to use if you don't want to waste your CPU's time. and C# is the language to use if you don't want to waste your programmers time :)

Hey! Embedded systems run your world buddy. Show some respect. point taken. I bow respectfully to the humble yet all powerful micro controllers that diligently wash my dishes, start my car, and warm my food. At least I can still take a shit with out a line of C. But not for long :bugeye:

superluminal
09-12-06, 09:17 PM
point taken. I bow respectfully to the humble yet all powerful micro controllers that diligently wash my dishes, start my car, and warm my food. At least I can still take a shit with out a line of C. But not for long :bugeye:
Ever sat on one of those toilets that automatically flushes? It's too late for your crap. Many models incorporate a tiny PIC12 or similar processor, with code for flush delays, daily flush function, etc. possibly written in C (most likely assembly for compactness). But still, your shit is at the mercy of code. Bwuhahaha! :D