December 24th, 2003, 04:20 AM
STL and Linux
I am trying to port my current C++ and C skills to Linux Programming. I have successfully created the standard Hello World starting project in C for linux using both files and standard output.
I am trying to do something simular using standard C++ libraries, I tried to use the iostream template class in the STL library, I don't whether it is supported in Linux however I can seem to use #include <iostream> without a linking error being generated. The linker throughs an error "Undefined reference" when I write the complete Hello World program:
I am at the moment thinking the problem is that I am not linking the program with the required stl library, however I have no idea how to do this in Linux.
using namespace std;
cout << "\n Hello World";
I have look through the standard included documentation but cannot find a reference of the libraries included in Linux (Red Hat 8.0), does any know of a good reference on the C++ libraries in Linux? Is this my problem or does Linux not support STL?
I am new to Linux programming so I am at the moment only really looking for a good reference site, thanks in advance.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!