Error message


2 replies [Last post]
robkla
robkla's picture
Offline
Joined: 2012-05-19
Points: 0

First, I have to say that I am totally new to this so please have patience with me when I ask what might seem like stupid questions.  I downloaded MinGW and followed the turtorial on how to change the path.  When I typed in gcc I got the following error message:

falta error: no input files

Compilation terminated

I saw where someone else was having the same problem and the following solution was suggested:

 save you programm in .c file, go to that directory(where you saved file) from console (use "cd" command) and call gcc with your file as a parameter

I'm not sure exactly what this means...can someone explain this in terms that's easier for a beginner to understand?

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Dreaming
Dreaming's picture
Offline
Joined: 2012-04-03
Points: 0

The error occured because you didn't input any files to compile. It's nothing big. The compiler works, it's just you didn't specify a .c file to convert to a .exe.

------------------------

To compile a program (assuming you have a Windows computer):

1. Write a program in C and save it as "example.c"

2. Save it anywhere you please. To test the compiler, I recommend the desktop.

3. In Command Prompt, type in "cd <INSERT DIRECTORY HERE>" (i.e. cd desktop)

4. You will then be inside that directory.

5. Then, type "gcc example.c -o example.exe"

6. If no errors occured, nothing should happen and you should be pushed onto a new line.

7. To see if it compiled correctly, type in the filename.exe (i.e. example.exe)

8. If it compiled right, it should run.

Hope that helped. (:

Kevin
Offline
When things break I did it. I am an admin!Enjoy my soothing baritone.Completionist. I am better than you.My name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!Boot up or shut up!I don't know when to shut up.I'm not a fanboy!
Joined: 2011-03-20
Points: 2570