when compiling a program which uses the file iostream gcc exits due to invalid references. an example: #include <iostream> void main() { std::cout << "This won't work \n"; } Will result in: /tmp/ccd16f9g.o(text + 0x35): In function '__static_initionalization_and_destruction_0(int, int)': undefined reference to 'std:ios__base:std:Init::Init[in charge]()' followed by others of simmiler content. This bug was found on a pentium 4 i686 machine running freespire linux 1.0.13
You are not linking against the libstdc++ library which contains the C++ standard library. Either use g++ instead of gcc to link or link with -lstdc++.