Compile errors: rev 93 w/ Qt 4.7.1

Help
RHL
2010-12-29
2013-04-25
  • RHL

    RHL - 2010-12-29

    I am building unixODBC-GUI-Qt rev. 93 against Qt v4.7.1 and unixODBC v.2.3.0.  I used the following configuration:

    ./configure -prefix=/opt/local -with-x -with-qt-dir-include=/opt/local/include -with-qt-dir-lib=/opt/local/lib -with-qt-dir-bin=/opt/local/bin

    After fixing the configuration issues with rev 93 {Unable to configure svn trunk}, I ran into two issues while trying to compile unixODBC-GUI-Qt

    1. szLogPrintf.cpp:10:22: error: autotest.h: No such file or directory

    2. conn.cpp:3116: error: call of overloaded ‘QString(NULL)’ is ambiguous

    The missing include file (autotest.h) in problem # 1 is related to a unixODBC issue
    { autotest.h}
    It looks like

    autotest.h
    

    was left out of the

    include_HEADERS
    

    in

    unixODBC-2.3.0/include/Makefile
    

    and thus, not installed.
    My solution was to manually copy

    unixODBC-2.3.0/include/autotest.h
    

    to my Qt include directory

    /opt/local/include
    

    .

    The second issue I ran into is either a "stricter compiler problem" or because I'm using QT 4.7.1.  The solution was to modify ODBCTestQ4/OdbcHandle.h, line 109 by casting the default NULL value for "desc" to a "(const char*)"

    diff OdbcHandle.h.old OdbcHandle.h.new
    109c109
    < OdbcHandle( int t, SQLHANDLE h, QString desc = NULL, SQLHANDLE stmt = SQL_NULL_HANDLE );
    --
    > OdbcHandle( int t, SQLHANDLE h, QString desc = (const char*) NULL, SQLHANDLE stmt = SQL_NULL_HANDLE );

    These two changes allowed me to successfully make rev. 93.

     
  • RHL

    RHL - 2010-12-29

    Addendum: sorry about the ugly post - still trying to master the BBCode mark-up.  Can't figure out how to edit my original post.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks