ODBC compile - drivermanager.h:102: error: ISO C++ forbids declaration of 'ErrorHandler' with no typ
  • Hellow,

    I am trying to compile livesupport, but I get the error compiling libodbc++-0.2.3-20050404:

    g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I/usr/lib/include -DIN_ODBCXX -D_GNU_SOURCE -g -O2 -MT drivermanager.lo -MD -MP -MF .deps/drivermanager.Tpo -c drivermanager.cpp -fPIC -DPIC -o .libs/drivermanager.o
    ../include/odbc++/drivermanager.h:102: error: ISO C++ forbids declaration of 'ErrorHandler' with no type
    ../include/odbc++/drivermanager.h:102: error: expected ';' before '*' token

    I am running on kernel 2.6.11-10mdk, gcc version 4.0.1-0.2mdk for Mandriva Linux release 2006.0

    unixODBC version 2.2.11
    libunixODBC-devel installed

    Thank you for your help and for your work

    Bruno
  • 4 Comments sorted by

  • I checked on another machine with gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk), and the compile of libodbc is OK.

    The problem comes from gcc 4.0.1

    I will look for a solution
  • In libodbc++-0.2.3-20050404/include/odbc++/drivermanager.h

    at line, say, 96

    before:
    class ODBCXX_EXPORT DriverManager {

    you just have to add the single line:
    class ErrorHandler;

    ...the bug is gone !
  • hmm.. i tried that as a fix, but am still stuck there... if only i didn't have my test introducing me to classes in c++ tomorrow afternoon, i'd already be able to figure it out.

    ben
  • oh its cause when i edit drivermanager.h and then do a whole recompile for making the debian package erases? i'm not sure but after i compile and go look at the file, my addition of class ErrorHandler is gone. must also learn how to compile debian packages i guess.