Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-15-2007, 04:25 AM   #1
Registered: May 2006
Posts: 70

Rep: Reputation: 15
Compiling simple c program?

Hi, im doing this tutorial on yere forum here.

And when i try to complile im getting the following

meniscus@meniscot:~$ which gcc
meniscus@meniscot:~$ cd Desktop
meniscus@meniscot:~/Desktop$ gcc -o simpleq simpleq.c
simpleq.c:1:9: error: #include expects "FILENAME" or <FILENAME>
simpleq.c: In function ‘main’:
simpleq.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
What is this about? Theres no "simpleq" executable?
Old 01-15-2007, 04:32 AM   #2
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
simpleq.c:1:9: error: #include expects "FILENAME" or <FILENAME>
says you have an include statement typo in the file, that is why no executable, you got a fatal error in the first step of the compilation process.

try making the include:

#include <stdio.h>

Last edited by Jaqui; 01-15-2007 at 04:34 AM.
Old 01-15-2007, 04:37 AM   #3
The Headacher
Registered: Jan 2007
Distribution: Vector Linux
Posts: 90

Rep: Reputation: 15
There's an error in the example.

As the output from gcc tells you, there's a problem with line 1.

change it to
#include <stdio.h>
I'm not sure if this is a good tutorial/howto if the first example is wrong...
Old 01-15-2007, 04:51 AM   #4
Registered: May 2006
Posts: 70

Original Poster
Rep: Reputation: 15
thanks that works now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling a simple program with qt fakie_flip Linux - Software 1 01-18-2006 01:33 AM
Compiling a simple C++ program for Windows Baix Programming 2 03-05-2005 07:17 PM
compiling simple c/c++ program but no good freeindy Programming 3 02-12-2005 11:38 AM
Compiling a simple C++ program kbeaver Programming 27 02-06-2004 08:02 PM
Compiling a simple Mesa/GLUT program Bojdom Linux - Software 2 02-02-2003 04:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration