Re: [campcaster-support] ODBC - Compile error on Ubuntu 64bit
  • Hi,

    > Author: AllesMeins
    > Link: http://code.campware.org/phorum/read.php?20,6213,6213#msg-6213
    >
    > I'm using Ubuntu 7.10 on an amd64. Compiling campcaster crashes with the dollowing error(s):
    >
    > ==========================================
    > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -DIN_ODBCXX -D_REENTRANT -D_GNU_SOURCE -g -O2 -MT resultset.lo -MD -MP -MF .deps/resultset.Tpo -c resultset.cpp -fPIC -DPIC -o .libs/resultset.o
    > resultset.cpp: In member function 'std::istream* odbc::ResultSet::getAsciiStream(int)':
    > resultset.cpp:1337: error: no matching function for call to 'odbc:: DataStream:: DataStream(odbc::ResultSet* const, void*&, int&, int, long int& )'
    > datastream.h:105: note: candidates are: odbc:: DataStream:: DataStream(odbc::ErrorHandler*, void*, int, int, SQLINTEGER& )
    > datastream.h:99: note: odbc:: DataStream:: DataStream(const odbc:: DataStream& )

    This is a known bug in libodbc++, it just does not compile on AMD 64.
    There is a Campcaster ticket tracking it [1], which has a link to the
    original libodbc++ bug [2]. You can apply the two patches in [2] by
    hand, though you might need to undo the old patch already in Campcaster
    first (mentioned in [1]). If you get a patch that works, please send it
    to this list, too, so that others can use it as well.


    > Earlier during the compile-process the following warning was displayed, which may be related to my problem:
    >
    > checking for sqlext.h... yes
    > checking sqlucode.h usability... no
    > checking sqlucode.h presence... yes
    > configure: WARNING: sqlucode.h: present but cannot be compiled

    I don't think this is a problem for now, it's more like a warning to
    libodbc++ developers that problems might arise in future. I'm pretty
    sure it's unrelated to the AMD 64 issue.

    Thanks and regards,

    Ferenc

    [1] http://code.campware.org/projects/campcaster/ticket/2077
    [2]
    http://sourceforge.net/tracker/index.php?func=detail&aid=1595055&group_id=19075&atid=319075