Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Compiler/Linker Error undefined reference to 'std::ios_base::Init::Init[in-charge]()

Reply
Thread Tools

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

 
 
clusardi2k@aol.com
Guest
Posts: n/a
 
      08-18-2005
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

 
Reply With Quote
 
 
 
 
Jules
Guest
Posts: n/a
 
      08-18-2005
I think you need to add -lstdc++, or use 'g++' rather than 'gcc' as
your driver program.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
typeof x == 'undefined' or x == undefined? -Lost Javascript 13 01-31-2007 12:04 AM
undefined vs. undefined (was: new Array() vs []) VK Javascript 45 09-12-2006 05:26 PM
undefined behavior or not undefined behavior? That is the question Mantorok Redgormor C Programming 70 02-17-2004 02:46 PM
Undefined Reference Error while linking with g++, STL on LINUX RU C++ 2 08-06-2003 03:28 PM
Error: 'undefined reference' in g++ but gcc succeeded Lu C++ 1 07-10-2003 12:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57