Compiling wxWidgets on MSW with ODBC Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Compiling wxWidgets on MSW with ODBC

Post by jazz » Tue May 16, 2006 10:31 pm

Hey all,

I'm just porting my project over to windows and seem to be having trouble with ODBC support in wxWidgets. My project compiles but when it goes to link i get undefined reference errors such as:
.objs\odbc.o:odbc.cpp:(.text+0x5b2): undefined reference to `_imp___ZN14wxDbConnectInfC1EPvRK8wxStringS3_S3_S3_S3_S3_'
.objs\odbc.o:odbc.cpp:(.text+0x786): undefined reference to `_imp___Z17wxDbGetConnectionP14wxDbConnectInfb'
.objs\odbc.o:odbc.cpp:(.text+0x7ef): undefined reference to `_imp___Z17wxDbGetConnectionP14wxDbConnectInfb'
.objs\odbc.o:odbc.cpp:(.text+0x9fa): undefined reference to `_imp___ZN4wxDb10GetColumnsERK8wxStringPtPKc'
Now, under linux I just made sure that I built wxWidgets with:
./configure --with-odbc
and everything would work fine.

Under windows however I'm not sure how to enable ODBC. I edited the config.gcc file to enable 'USE_ODBC=1' but it still doesn't seem to have built it in. The setup.h file for my build still had wxUSE_ODBC set to 0 as well.

Am I missing a step? What is required to get ODBC support enabled when building wxWidgets from source under MSW?

Cheers.
[INSERT LAME SIG HERE]

jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Post by jazz » Wed May 17, 2006 1:08 am

Just found an obscure post on another forum which helped with this.

For anyone else doing this, you need to edit $(WX_DIR)\include\msw\setup.h and set wxUSE_ODBC to 1 in there as well.
[INSERT LAME SIG HERE]

Post Reply