Download your favorite Linux distribution at LQ ISO.
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 03-10-2009, 08:55 AM   #1
LQ Newbie
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
gcc error: iostream: no such file or directory linux 4.1.2

hello guys!

I just started on a small project and I've been having problems with the compiling.

This is a .c file in wich I use iostream library.
I compiled my file using "gcc file.c". As I've heard iostream is a c++ library, yet on another computer it worked great.

Can it be the fault of a broken install or something?

I also tried removing the iostream library and use stdio.h . Now I got a whole new problem:

"undefined reference to 'main'". I get the same error if I use the iostream but I try compiling it with g++.

Now I know that means it doesn't find my main class, but still trying it on another Linux working computer, compiled just fine using the "gcc test.c" syntax!

Can any of you please help me? I'm kinda in the dark right now...

Old 03-10-2009, 11:53 AM   #2
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Rep: Reputation: 16
You'll need to post your code and the errors that gcc reports for us to help you. Read this and use code tags.

Can a mod please move this to programming? thanks


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
gcc error - "iostream: No such file or directory" SirTristan Linux - Software 4 06-03-2012 09:59 PM
gcc: installation problem, cannot exec `as': No such file or directory ERROR jaisol Slackware 8 08-05-2006 01:01 PM
gcc: installation problem, cannot exec `cc1': No such file or directory Error Message 08h Programming 2 07-20-2006 12:44 PM
gcc: installation problem, cannot exec `cc1': No such file or directory Error Message 08h Linux - Newbie 1 06-01-2004 05:26 AM
gcc with iostream problem rob99 Programming 9 04-16-2003 10:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:22 AM.

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