Problems getting g++ to run
Karl Gangle
kgangle72@attbi.com
Wed Mar 5 23:04:00 GMT 2003
Hi,
I am trying to compile a c++ program using g++ in Linux. The program is
#include <iostream>
#include <string>
int main() {
string s1( "string1" );
cout << s1 << endl;
return 1;
}
The compiler errors indicate that string, cout, endl, and s1 are not
defined. I think the problem is that the include files are not found. So,
what needs to be done for g++ to find the include file? What environment
variables along with there value need to be set?
What needs to be done to set library environment variable values?
If there are any other things that need to be done to get g++ to work please
let me know.
Thank you.
Karl Gangle
More information about the Gcc-help
mailing list