Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Did yum install kdevelop and problems with compiling


  • Please log in to reply

#1
sugantha

sugantha

    New Member

  • Member
  • Pip
  • 5 posts
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
  • 0

Advertisements


#2
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
I don't quite understand. If you are installing via yum there should be no need to compile yourself. Did you have any issues installing gcc through yum? Is this RHEL or fedora core?

Lastly, just to double check, are you using the KDE desktop?
  • 0

#3
sugantha

sugantha

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
Hello...Thanks for your reply...Sorry my post was a little ambiguous.First off I installed KDevelop using yum.When I tried to compile a simple Hello world program...I got errors like missing g++, missing gcc etc..so I did 'yum install g++' and set the PATH variable to gcc's installation directory...Now when I compile the same program, it gives the above mentioned errors...(specifically in the c++config.h file)...Should I configure something in the c++config.h file before trying to compile programs in KDevelop...Any suggestions are appreciated...Thanks again.

P.S: I am using Fedora 8 with KDE

Edited by sugantha, 04 July 2008 - 05:03 AM.

  • 0

#4
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
What command are you using to compile your program?

Something like a hello world program should compile with something simple like this:

gcc NAMEOFFILETOBECOMPILED -o OUTPUTFILENAME

What path was your gcc put in? I would have expected to be somewhere already in your path like /usr/bin.
  • 0

#5
sugantha

sugantha

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
I altered the PATH variable in the file ~/.bashrc and it includes '/usr/bin/gcc34' ...

I tried to compile the C++ program with 'g++ program.c' and it works well...The problem comes when I use the 'Compile File' option under the Build tab in KDevelop...
  • 0

#6
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
If gcc34 is a file and not a directory then /usr/bin in your ~/.bashrc file would include gcc. I can't further troubleshoot Kdevelop as it is not something I have used. You may want to try forums specifically oriented toward that particular application.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP