This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems getting g++ to run


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]