Date: Tue, 14 Jun 2005 00:05:15 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 565 ************************************************** Monday 13 June 2005 Number 565 ************************************************** Subjects for today 1 wxWidgets and unixODBC : lsunley at mb.sympatico.ca **= Email 1 ==========================** Date: Sun, 12 Jun 2005 23:17:01 -0500 From: lsunley at mb.sympatico.ca Subject: wxWidgets and unixODBC Hi all, I managed a compile of wxWidgets 2.6.1 with GCC 3.3.5 B4 that will use the unixODBC for OS/2 port. I did a configure with --with-odbc=sys and the environment variable LDFLAGS set to (set LDFLAGS=-L m:/uodbc/lib) a value that would link in the unixODBC link libraries. I also had to patch the configure file to use _System when doing the test for the link with -lodbc line 29068 changed from char SQLAllocEnv (); to char _System SQLAllocEnv (); so that the configure test would find the correct symbol in odbc.lib. I also generated an odbc.a file using emximp so that the configure test would link. emximp -o odbc.a odbc.lib The header files from unixODBC have to placed in the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH and the LIBRARY_PATH can be changed to include the ../lib directory from unixODBC. In the makefile generated the CXFLAGS and CXXFLAGS values have the define -DALLREADY_HAVE_OS2_TYPES added to eliminate an invalid redefinition created by the unixodbc sqltypes.h file. The sqltypes.h file from unixODBC has to be changed to eliminate a redefinition of HINSTANCE on line 120 The dllnames.sh file also has to be changed to keep it from generating a nine character name for the wxodbc26.dll file. The change is from dllFile=`echo $dllFile | sed 's/base_\(...\)/b\1/'` to dllFile=`echo $dllFile | sed 's/base_\(...\)/\1/'` on line 11. I have not done much testing but the dbtest sample program compiles, links and does show the ODBC data sources correctly. -- ----------------------------------------------------------- lsunley at mb.sympatico.ca -----------------------------------------------------------