LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-29-2008, 11:56 AM   #1
sugantha
Member
 
Registered: Feb 2008
Distribution: Ubuntu 11.04 Natty Narwhal , Fedora Linux
Posts: 43

Rep: Reputation: 15
kdevelop complains while compiling


Hello all...I wanted to install kdevelop so I tried "yum install kdevelop" ...It installed and gave errors like

gcc found...no
g++ found...no

so I reset PATH variable to point to gcc34 and also did
yum install gcc-c++

Now when I try compiling the following code I get...

Code:
#include <iostream>
 using namespace std;   
 int main(void)
 {
   cout << "A";
   return 0;
 }


cd '/home/sugantha/Hello/debug/src' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" gmake -k hello.lo
compiling hello.cpp (g++)
compiling hello.cpp (g++)
/home/sugantha/Hello/src/hello.cpp:28:3: warning: no newline at end of file
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/c++config.h:43: error: expected constructor, destructor, or type conversion before 'namespace'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/c++config.h:47: error: '__gnu_debug_def' is not a namespace-name
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/c++config.h:47: error: expected namespace-name before ';' token
/home/sugantha/Hello/src/hello.cpp: In function 'int main()':
/home/sugantha/Hello/src/hello.cpp:26: error: 'cout' was not declared in this scope
gmake: *** [hello.lo] Error 1
*** Exited with status: 2 ***

Please tell me what I am doing wrong here...Any help will be most appreciated...Thanks

Last edited by sugantha; 06-29-2008 at 12:23 PM.
 
Old 06-30-2008, 06:08 AM   #2
sugantha
Member
 
Registered: Feb 2008
Distribution: Ubuntu 11.04 Natty Narwhal , Fedora Linux
Posts: 43

Original Poster
Rep: Reputation: 15
Since these errors are in c++config.h file, am I supposed to configure something before trying to run programs...Any help would be most welcome...Thanks.
 
Old 07-03-2008, 04:42 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I've moved this to the programming forum. Hopefully you can get some help there.
 
Old 07-04-2008, 06:06 AM   #4
sugantha
Member
 
Registered: Feb 2008
Distribution: Ubuntu 11.04 Natty Narwhal , Fedora Linux
Posts: 43

Original Poster
Rep: Reputation: 15
Thank you Reddazz...I am sure someone would help me soon
 
  


Reply



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 with Kdevelop 52cent Programming 7 04-23-2007 11:43 PM
compiling kdevelop merchtemeagle Linux - Software 2 03-16-2005 01:33 PM
compiling in kdevelop shyam_d_sundar Linux - Software 1 05-06-2004 04:11 AM
Problem compiling KDevelop 3 stonehurstX11 Linux - Software 7 03-13-2004 10:30 AM

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

All times are GMT -5. The time now is 06:07 AM.

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