PDA

View Full Version : g++ problem in Opensuse10.2



joseph
8th April 2008, 14:59
Hi guys,

While compile "helloword program" in Opensuse10.2 ,using
g++ or gcc
i am getting compilation errors.
Here is my helloword.cpp


//This is the test program, helloworld

#include <iostream>
using namespace std;

int main()
{
cout << "Hello World!" << endl;

return 0;
}


After writing the code i am compiling ,the file using g++......


g++ -o hello helloworld.cpp


Here is the errors am getting while compilation ....


In file included from helloworld.cpp:3:
/usr/include/c++/4.1.2/iostream:43:28: error: bits/c++config.h: No such file or directory
In file included from /usr/include/c++/4.1.2/ios:43,
from /usr/include/c++/4.1.2/ostream:44,
from /usr/include/c++/4.1.2/iostream:44,
from helloworld.cpp:3:
/usr/include/c++/4.1.2/iosfwd:45:29: error: bits/c++locale.h: No such file or directory
/usr/include/c++/4.1.2/iosfwd:46:25: error: bits/c++io.h: No such file or directory
In file included from /usr/include/ctype.h:28,
from /usr/include/c++/4.1.2/cctype:51,
from /usr/include/c++/4.1.2/iosfwd:47,
from /usr/include/c++/4.1.2/ios:43,
from /usr/include/c++/4.1.2/ostream:44,
from /usr/include/c++/4.1.2/iostream:44,
from helloworld.cpp:3:
/usr/include/bits/types.h:31:20: error: stddef.h: No such file or directory
In file included from /usr/include/c++/4.1.2/climits:50,
from /usr/include/c++/4.1.2/bits/stl_algobase.h:66,
from /usr/include/c++/4.1.2/bits/char_traits.h:46,
from /usr/include/c++/4.1.2/ios:45,
from /usr/include/c++/4.1.2/ostream:44,
from /usr/include/c++/4.1.2/iostream:44,
from helloworld.cpp:3:
------- --------
------- --------




Can anybody help me to solve this error .
i am so stucked up..!!!