Thread: Anyone know what this is?

  1. #1
    Registered User
    Join Date
    Oct 2001

    Unhappy Anyone know what this is?

    I'm trying to compile a whole lot of c++ code on a new Unix server. Unfortunately, I get a huge error message (part of it below). I can't think of why its doing it (all the headers etc are there).

    Anyone got any idea what to do?

    gcc -O -L/usr/home/ftmsonline/pgsql/lib -lpq -lcrypto -I- -I/usr/include -I/usr/include/g++ -I/usr/home/ftmsonline/pgsql/include -I/usr/home/ftmsonline/source -o ../cgi-bin/generic.cgi pipes.o query.o templatelib.o cgilib.o validate.o get_key.o generic.o
    pipes.o: In function `run(basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >,
    basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >)':
    pipes.o(.text+0x7c): undefined reference to `runtime_error virtual table'

    etc, etc...

    cgilib.o(.text+0xb99): undefined reference to `cerr'
    cgilib.o(.text+0xb9e): undefined reference to `ostream:perator<<(char const *)'
    validate.o: In function `validate(map<basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >, basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> >, less<basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > >, allocator<basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > > > &)':
    validate.o(.text+0x4b4): undefined reference to `cout'
    validate.o(.text+0xc24): undefined reference to `cout'
    validate.o(.text+0x1351): undefined reference to `cout'
    validate.o(.text+0x1d41): undefined reference to `cout'
    validate.o(.text+0x25e1): undefined reference to `cerr'
    validate.o(.text+0x25e6): undefined reference to `ostream:perator<<(char const *)'
    validate.o(.text+0x2738): undefined reference to `cerr'
    validate.o(.text+0x273d): undefined reference to `ostream:perator<<(char const *)'
    validate.o(.text+0x28c1): undefined reference to `cerr'
    validate.o(.text+0x28c6): undefined reference to `ostream:perator<<(char const *)'
    generic.o: In function `main':
    generic.o(.text+0x924): undefined reference to `cout'
    generic.o(.text+0xa97): undefined reference to `runtime_error type_info function'
    *** Error code 1

  2. #2
    Registered User
    Join Date
    Oct 2001

    didn't know about the smilies

    Obviously my code doesn't contain small pictures of smiling people (although, that would be pretty cool...)

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    You run the GNU C++ compiler by running g++ not gcc

    > -lpq -lcrypto
    And you might need to put these at the end of the command line, not at the start
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed