954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C++ source file being compiled as C source file

I am using gcc on Suse Linux Enterprise Server 10 to compile my C++ source files. The problem I have is that when I invoke the command[INDENT]g++ source_file.cpp[/INDENT]the file source_file.cpp is compiled as a C source file.
I realized the problem when I was trying to set up wxPython on my system since the .ccp source files on wxPython sources were being compiled as C source files thus generating countless lines of C errors .
I have tried to solve it but no progress so far.

Any help will be highly appreciated!

sureronald
Junior Poster
139 posts since May 2008
Reputation Points: 11
Solved Threads: 19
 

Well only thing I can think of is there might be some problem with your repositories.So may be you can install them again.Because some problems can arise because they are of same origin.
gcc is GNU Compiler Collection which has specific packages for compilation of C++ files which we call g++.

csurfer
Posting Pro
568 posts since Jan 2009
Reputation Points: 485
Solved Threads: 88
 

Thanks for that I'm going to try installing them again.

sureronald
Junior Poster
139 posts since May 2008
Reputation Points: 11
Solved Threads: 19
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You