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

Discussion in 'C++' started by clusardi2k@aol.com, Aug 18, 2005.

  1. Guest

    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
     
    , Aug 18, 2005
    #1
    1. Advertising

  2. Jules Guest

    I think you need to add -lstdc++, or use 'g++' rather than 'gcc' as
    your driver program.
     
    Jules, Aug 18, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Heiserer
    Replies:
    1
    Views:
    2,948
    Artie Gold
    Aug 1, 2003
  2. Geoffrey S. Knauth
    Replies:
    6
    Views:
    1,032
    Earl Purple
    Jan 18, 2006
  3. DaVinci
    Replies:
    3
    Views:
    432
    Jacek Dziedzic
    Apr 9, 2006
  4. DaVinci
    Replies:
    7
    Views:
    732
    Fraser Ross
    Apr 7, 2006
  5. Robin
    Replies:
    9
    Views:
    1,272
Loading...

Share This Page