This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

link errors when include iostream



I just installed the v3 lib and tried to compile and link the following
test program:

#include <iostream>

int main( int argc, char **argv )
{
}

I got the following link errors:
In function `__static_initialization_and_destruction_0':
undefined reference to `ios_base::Init::Init(void)'
undefined reference to `ios_base::Init::~Init(void)'

I tried building a program that uses <ext/hash_map> and created a hash
table and inserted values.  This worked fine.  Only seem to have
problems when need to include <iostream>

My configuration:
RedHat 6.2
gcc-2.95.2
libstdc++-2.90.8

Followed instructions in your install guide (removing v2 and libio,
installing v3, and setting symbolic link), including removing the flag
that causes the inline errors.

My process (yes - i kept the src and bld directories seperate)
configure --prefix=/usr/local --enable-languages=c++
make bootstrap
make install

I built using (tried all of the following)
c++ test.cpp
c++ test.cpp -L/usr/local/lib -lstdc++

What am i missing here?  Seems simple, but cant get this to link <argh>

-Rob

-- 
Rob Willis
rob@e-critical.com
760-822-1439

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