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