On Mon, 26 Jan 2009, darthsidpal wrote:

> --- In [email protected], Saifi Khan <saifi.k...@...> wrote:
> >
> > Hi all:
> > 
> > qt4-4.4.3 compilation from sources runs into an interesting
> > compilation issue.
> > 
> > --
> > /usr/local/include/sqltypes.h:401: error: ISO C++ forbids
> > declaration of 'SQLBIGINT' with no type
> > /usr/local/include/sqltypes.h:404: error: ISO C++ forbids
> > declaration of 'SQLUBIGINT' with no type
> > --
> > 
> > i've uploaded the sqltypes.h file at
> > http://twincling.pastebin.com/f70211c16
> > 
> > Please see highlighted line numbers 400 and 403.
> > 
> > The relevant build log is seen here:
> > 
> > ===>  Installing for qt4-4.4.3
> > ===>   qt4-4.4.3 depends on package: qt4-l10n>=4.4.3 - found
> > ===>   qt4-4.4.3 depends on file:
> /usr/local/lib/qt4/plugins/sqldrivers/libqsqlmysql.so - found
> > ===>   qt4-4.4.3 depends on file:
> /usr/local/lib/qt4/plugins/sqldrivers/libqsqlodbc.so - not found
> > ===>    Verifying install for
> /usr/local/lib/qt4/plugins/sqldrivers/libqsqlodbc.so in
> /usr/ports/databases/qt4-odbc-plugin
> > ===>  Building for qt4-odbc-plugin-4.4.3
> > Warning: Object directory not changed from original
> /usr/ports/databases/qt4-odbc-plugin/work/qt-x11-opensource-src-4.4.3
> > c++ -fpic -DPIC -O2 -fno-strict-aliasing -pipe
> -Isrc/sql/drivers/odbc  -I/usr/local/include/qt4 
> -I/usr/local/include/qt4/Qt  -I/usr/local/include  
> -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII  -DQT_PLUGIN
> -DQT_SQL_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE  -D_LARGEFILE_SOURCE
> -DQT_SHARED -c src/plugins/sqldrivers/odbc/main.cpp -o main.So
> > In file included from /usr/local/include/sql.h:24,
> >                  from
> src/plugins/sqldrivers/odbc/../../../sql/drivers/odbc/qsql_odbc.h:69,
> >                  from src/plugins/sqldrivers/odbc/main.cpp:40:
> > /usr/local/include/sqltypes.h:401: error: ISO C++ forbids
> declaration of 'SQLBIGINT' with no type
> > /usr/local/include/sqltypes.h:404: error: ISO C++ forbids
> declaration of 'SQLUBIGINT' with no type
> > *** Error code 1
> > 
> > Stop in
> /usr/ports/databases/qt4-odbc-plugin/work/qt-x11-opensource-src-4.4.3.
> > *** Error code 1
> > 
> > Stop in /usr/ports/databases/qt4-odbc-plugin.
> > *** Error code 1
> > 
> > Stop in /usr/ports/devel/qt4.
> > *** Error code 1
> > 
> > Stop in /usr/ports/devel/qt4.
> > 
> > --
> > 
> > Any suggestions or pointers on how this issue can be resolved?
> > 
> > thanks
> > Saifi.
> >
> 
> Hi Saifi,
> 
> I think the problem here is that ODBCINT64 and UODBCINT64 aren't being
> recognized as a 'type' but as a 'modifier' (for example if i declare
> "register x" as a variable, ISO C++ recognizes "register" as a
> 'modifier' and not a 'type' and will give the error "ISO C++ forbids
> declaration of 'x' with no type"). So maybe in the lines above it
> where ODBCINT64 and UODBCINT64 were defined, there was some error
> while compilation.
> 
> I think you are using a 64-bit OS. As far as i remember, UNIX uses
> "long long" for 64 bit variables and windows uses "__int64". So... try
> replacing 
> 
> #typedef ODBCINT64       SQLBIGINT;
> with
> #typedef long long       SQLBIGINT;
> 
> and
> 
> #typedef UODBCINT64      SQLUBIGINT;
> with
> #typedef unsigned long long      SQLUBIGINT;
> 
> This might work. Not sure.
> If it works,... replace the sqltypes.h with the original file after
> the compilation, as this change might cause problems later on.
> 
> Regards,
> Siddharth Pal
> 

Hi Siddharth:

The unixODBC folks have written the stuff in a nested #ifdef !

The current build is on a 32-bit intel system.


thanks
Saifi.

Reply via email to