From 0d73e5a104a6c61d942c223d053a38626599b893 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 18 Jul 1998 10:15:35 +0000 Subject: [PATCH] ODBC compile (and link) fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/odbc.h | 2 ++ install/gtk/configure | 10 ++++++++-- install/gtk/configure.in | 8 ++++++++ src/Makefile.in | 1 - src/gtk/setup/maketmpl.in | 2 +- src/gtk/setup/substit.in | 1 + src/gtk1/setup/maketmpl.in | 2 +- src/gtk1/setup/substit.in | 1 + src/iodbc/execute.c | 2 +- src/iodbc/hstmt.c | 2 +- src/iodbc/prepare.c | 2 +- 11 files changed, 25 insertions(+), 8 deletions(-) diff --git a/include/wx/odbc.h b/include/wx/odbc.h index ed73055ded..58d027a083 100644 --- a/include/wx/odbc.h +++ b/include/wx/odbc.h @@ -25,9 +25,11 @@ #endif #ifdef __WXGTK__ +extern "C" { #include <../iodbc/postgres/isqlext.h> #include <../iodbc/postgres/odbc_funcs.h> #include <../iodbc/postgres/odbc_types.h> +} #else #include #endif diff --git a/install/gtk/configure b/install/gtk/configure index 88634368bc..f243d9f196 100755 --- a/install/gtk/configure +++ b/install/gtk/configure @@ -6163,13 +6163,18 @@ fi +DL_LIBRARY=-ldl + + + + OPENGL_INCLUDE= OPENGL_LIBRARY= OPENGL_LINK= if test "$USE_OPENGL" = 1; then echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6 -echo "configure:6173: checking for OpenGL includes" >&5 +echo "configure:6178: checking for OpenGL includes" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -6184,7 +6189,7 @@ for ac_dir in $SEARCH_INCLUDE; OPENGL_INCLUDE="-I$ac_find_includes" echo "$ac_t""found $ac_find_includes" 1>&6 echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6 -echo "configure:6188: checking for OpenGL library" >&5 +echo "configure:6193: checking for OpenGL library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -6652,6 +6657,7 @@ s%@GUI_TK_LIBRARY@%$GUI_TK_LIBRARY%g s%@GUI_TK_LINK@%$GUI_TK_LINK%g s%@TOOLKIT@%$TOOLKIT%g s%@TOOLKIT_DEF@%$TOOLKIT_DEF%g +s%@DL_LIBRARY@%$DL_LIBRARY%g s%@OPENGL_INCLUDE@%$OPENGL_INCLUDE%g s%@OPENGL_LIBRARY@%$OPENGL_LIBRARY%g s%@OPENGL_LINK@%$OPENGL_LINK%g diff --git a/install/gtk/configure.in b/install/gtk/configure.in index 77032b17eb..353601aeb5 100644 --- a/install/gtk/configure.in +++ b/install/gtk/configure.in @@ -1201,6 +1201,14 @@ AC_SUBST(GUI_TK_LINK) AC_SUBST(TOOLKIT) AC_SUBST(TOOLKIT_DEF) +dnl ---------------------------------------------------------------- +dnl select dynamic loader (used by iODBC to load drivers) +dnl ---------------------------------------------------------------- + +DL_LIBRARY=-ldl + +AC_SUBST(DL_LIBRARY) + dnl ---------------------------------------------------------------- dnl search for opengl dnl ---------------------------------------------------------------- diff --git a/src/Makefile.in b/src/Makefile.in index 6be1d72eec..1a3358f04a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -178,7 +178,6 @@ LIB_C_SRC=\ iodbc/hstmt.c \ iodbc/connect.c \ iodbc/prepare.c \ - iodbc/execute.c \ iodbc/result.c \ iodbc/execute.c \ iodbc/fetch.c \ diff --git a/src/gtk/setup/maketmpl.in b/src/gtk/setup/maketmpl.in index 8c5244d63f..540aede6b9 100644 --- a/src/gtk/setup/maketmpl.in +++ b/src/gtk/setup/maketmpl.in @@ -107,7 +107,7 @@ WX_LIBS = -L$(GLOBAL_LIB_DIR) -lwx_gtk OPENGL_LIBS = $(OPENGL_LIBRARY) $(OPENGL_LINK) -GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) +GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) -ldl LINK = $(CXX) -o $@ LINK_LIBS= \ diff --git a/src/gtk/setup/substit.in b/src/gtk/setup/substit.in index 127ccdd019..d56b6c1da9 100644 --- a/src/gtk/setup/substit.in +++ b/src/gtk/setup/substit.in @@ -34,6 +34,7 @@ s|*X_PRE_LIBS*|@X_PRE_LIBS@|g s|*GUI_TK_INCLUDE*|@GUI_TK_INCLUDE@|g s|*GUI_TK_LIBRARY*|@GUI_TK_LIBRARY@|g s|*GUI_TK_LINK*|@GUI_TK_LINK@|g +s|*DL_LIBRARY*|@DL_LIBRARY@|g s|*OPENGL_INCLUDE*|@OPENGL_INCLUDE@|g s|*OPENGL_LIBRARY*|@OPENGL_LIBRARY@|g s|*OPENGL_LINK*|@OPENGL_LINK@|g diff --git a/src/gtk1/setup/maketmpl.in b/src/gtk1/setup/maketmpl.in index 8c5244d63f..540aede6b9 100644 --- a/src/gtk1/setup/maketmpl.in +++ b/src/gtk1/setup/maketmpl.in @@ -107,7 +107,7 @@ WX_LIBS = -L$(GLOBAL_LIB_DIR) -lwx_gtk OPENGL_LIBS = $(OPENGL_LIBRARY) $(OPENGL_LINK) -GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) +GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) -ldl LINK = $(CXX) -o $@ LINK_LIBS= \ diff --git a/src/gtk1/setup/substit.in b/src/gtk1/setup/substit.in index 127ccdd019..d56b6c1da9 100644 --- a/src/gtk1/setup/substit.in +++ b/src/gtk1/setup/substit.in @@ -34,6 +34,7 @@ s|*X_PRE_LIBS*|@X_PRE_LIBS@|g s|*GUI_TK_INCLUDE*|@GUI_TK_INCLUDE@|g s|*GUI_TK_LIBRARY*|@GUI_TK_LIBRARY@|g s|*GUI_TK_LINK*|@GUI_TK_LINK@|g +s|*DL_LIBRARY*|@DL_LIBRARY@|g s|*OPENGL_INCLUDE*|@OPENGL_INCLUDE@|g s|*OPENGL_LIBRARY*|@OPENGL_LIBRARY@|g s|*OPENGL_LINK*|@OPENGL_LINK@|g diff --git a/src/iodbc/execute.c b/src/iodbc/execute.c index 3cc17128f2..eb2633a6ed 100644 --- a/src/iodbc/execute.c +++ b/src/iodbc/execute.c @@ -52,7 +52,7 @@ static void do_cursoropen(STMT_t FAR* pstmt) } } -RETCODE SQL_API SQLexecute ( HSTMT hstmt ) +RETCODE SQL_API SQLExecute ( HSTMT hstmt ) { STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; HPROC hproc = SQL_NULL_HPROC; diff --git a/src/iodbc/hstmt.c b/src/iodbc/hstmt.c index a336f038a3..6850bda25b 100644 --- a/src/iodbc/hstmt.c +++ b/src/iodbc/hstmt.c @@ -184,7 +184,7 @@ RETCODE _iodbcdm_dropstmt( HSTMT hstmt ) return SQL_SUCCESS; } -RETCODE SQL_API SQLfreestmt ( +RETCODE SQL_API SQLFreeStmt ( HSTMT hstmt, UWORD fOption ) { diff --git a/src/iodbc/prepare.c b/src/iodbc/prepare.c index b4a13716f0..9e71ea0c4a 100644 --- a/src/iodbc/prepare.c +++ b/src/iodbc/prepare.c @@ -27,7 +27,7 @@ #include <../iodbc/itrace.h> -RETCODE SQL_API SQLprepare ( +RETCODE SQL_API SQLPrepare ( HSTMT hstmt, UCHAR FAR* szSqlStr, SDWORD cbSqlStr ) -- 2.45.2