Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-16-2004, 03:30 PM   #1
LQ Newbie
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Unhappy g++ V3.3.3 can't find cstdio include on FC2


Please see my simple C++ program below.
I'm getting the following error when I compile it on FC2 with g++ v3.3.3 but I'm able to compile it on Red Hat Linux 2.4.18-3. I noticed on Red Hat the g++ compiler includes /usr/include/g++-3 but this is replaced by /usr/include/c++/3.3.3 on FC2. Please some one tell me how can I fix this issue ?


g++ test.cpp -v
#include <...> search starts here:
End of search list.
test.cpp: In constructor `conf::conf(char*)':
test.cpp:22: error: `gets' undeclared (first use this function)
test.cpp:22: error: (Each undeclared identifier is reported only once for each
function it appears in.)

------------------Prog starts here -------------------------------------

#include <iostream>
#include <fstream>

class conf {


conf(char *file)
char *line_buf;
ifstream cf(file);

// open the file
if (!cf.is_open()) {


int main()
return 0;

-----------------Prog end here---------------------------------------------


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
Quanta install can't find X include Ezplan Linux - Software 6 12-03-2005 05:00 PM
cannot find mysql include files lsimon4180 Linux - Software 5 03-25-2005 03:41 PM
Where to find/How to change .h include directories for g++ sfcesario Linux - Software 1 01-31-2004 11:12 AM
g++ does not find include files StressedLemming Linux - Newbie 2 11-30-2003 07:12 AM
how can i find all include special word in a dir henryluo Linux - General 4 11-12-2003 11:56 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:25 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
Open Source Consulting | Domain Registration