LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-07-2005, 12:11 PM   #1
roxvogn
LQ Newbie
 
Registered: Oct 2004
Posts: 6

Rep: Reputation: 0
c++ libraries missing


it seems to me that my c++ libraries are missing or something.

I have this basic program:

Code:
#include <stdio.h>

main(){
        printf("Test for c++ compiler. It is working! \n");
}

and after compilation I get:

Code:
testcpp: line 16: extern: command not found
testcpp: line 22: typedef: command not found
testcpp: line 35: typedef: command not found
testcpp: line 36: typedef: command not found
testcpp: line 37: typedef: command not found
/testcpp: line 38: typedef: command not found
testcpp: line 41: typedef: command not found
testcpp: line 42: typedef: command not found
...
testcpp: line 51: __extension__: command not found
testcpp: line 52: __extension__: command not found
testcpp: line 60: __extension__: command not found
...
testcpp: line 81: syntax error near unexpected token `}'
testcpp: line 81: `__extension__ typedef struct { int __val[2]; } __fsid_t;'
what's wrong with this pucture and how to fix it?

Thank you!
 
Old 03-07-2005, 01:38 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
How did you manage to get these errors...?!??
Note: cpp is NOT the C++ compiler. g++ is.

Just compile with C++ compiler like this:
Code:
g++ -Wall -o testcpp testcpp.cc
Or, use the plain C compiler, as your code is C:
Code:
g++ -Wall -o testcpp testcpp.cc

Last edited by Hko; 03-07-2005 at 01:40 PM.
 
  


Reply


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
Missing libraries help Jmcatch742 Fedora 1 11-17-2004 06:00 PM
oracle missing libraries DaveWolles Linux - Software 0 03-02-2004 09:12 AM
missing libraries onebadnewbie Linux - Software 3 05-24-2003 12:49 AM
Missing Libraries??? shooter Linux - General 3 12-09-2001 10:37 AM
missing libraries babelfish Linux - Newbie 4 08-17-2001 02:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:26 PM.

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