Menu

#7 Does not compile under gcc 3.3

open
nobody
None
5
2003-05-29
2003-05-29
Anonymous
No

The blitzed trivia bot does not compile under g++-3.3,
giving the errors seen in the attached text file. Note
that it compiles cleanly under 2.95.

Discussion

  • Nobody/Anonymous

    Output of make(1)

     
  • Brendan Byrd

    Brendan Byrd - 2004-11-04

    Logged In: YES
    user_id=171143

    Seems that the code is too old for newer object types. Try
    these fixes:

    perl -pi -e 's/ios\:\:/std::ios::/g' src/*
    perl -pi -e 's/log/tlog/g' src/*
    perl -pi -e 's/tlog\.h/log.h/g' src/*
    perl -pi -e 's/tlog/log/g' src/Makefile* src/options.h
    perl -pi -e 's/<ctype\.h>/<cctype>/g' src/*
    perl -pi -e 's/<errno\.h>/<cerrno>/g' src/*
    perl -pi -e 's/<signal\.h>/<csignal>/g' src/*
    perl -pi -e 's/<stdarg\.h>/<cstdarg>/g' src/*
    perl -pi -e 's/<stdio\.h>/<cstdio>/g' src/*
    perl -pi -e 's/<stdlib\.h>/<cstdlib>/g' src/*
    perl -pi -e 's/<string\.h>/<cstring>/g' src/*
    perl -pi -e 's/<time\.h>/<ctime>/g' src/*
    perl -pi -e 's/<fstream\.h>/<fstream>\n#include
    <iostream>/g' src/*
    perl -pi -e 's/define QUESTION_H/define QUESTION_H\nusing
    namespace std\;/g' src/question.h
    perl -pi -e 's/001VERSION\n/001VERSION /' src/client.cpp

    That seemed to have fix the compiling problem. Sorry about
    the lack of patch form, but the commands should be easy to
    plug into your favorite shell.

     
  • jose nazario

    jose nazario - 2005-01-17

    Logged In: YES
    user_id=350099

    the easier way: add "using namesapace std;" at the end of
    h.h and in client.cpp add "#include <iostream>" before the
    other include. works like a champ on os x 10.3.x.

     
  • Kevin

    Kevin - 2005-05-27

    Logged In: YES
    user_id=847966

    It's not giving me a go either....

    terminal is giving me

    make: *** No targets specified and no makefile found. Stop.

    Could ya give me a few pointers? :)
    I did the perl replacements

     

Log in to post a comment.