Compiler/Linker Error undefined reference to 'std::ios_base::Init::Init[in-charge]()

C

clusardi2k

Hello,

What can I do about these gcc Red Hat Linux errors.
They are coming from the archive file.

%gcc -I/usr/fltk -O2 -Wall -Wunused -fno-exceptions
-I/usr/X11R6/include -o run main.o
-L/user/fltk/lib -lfltk_images -lfltk -lpng -ljpeg -lz
-L/usr/X11R6/lib -lm -lXext -lX11 -lsupc++ chris.a
-lpci -lm -lccur_rt -lrt

chris.a(file1.o)(.text+0x23a):
In function `__static_initialization_and_destruction_0':
/usr/include/c++/3.2.3/iostream:63: undefined reference to
`std::ios_base::Init::Init[in-charge]()'

chris.a(file1.o)(.text+0x269):
In function `__tcf_0':
/usr/include/c++/3.2.3/iostream:63: undefined reference to
`std::ios_base::Init::~Init [in-charge]()'

collect2: ld returned 1 exit status
make: *** [vme.x] Error 1

Thank you,
Christopher Lusardi
 
J

Jules

I think you need to add -lstdc++, or use 'g++' rather than 'gcc' as
your driver program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top