This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
ODBC with CYGWIN32 B19.1
- To: Cygnus Mailing List <gnu-win32 at cygnus dot com>
- Subject: ODBC with CYGWIN32 B19.1
- From: Ludovic LANGE <llange at capgemini dot fr>
- Date: Fri, 24 Apr 1998 14:15:56 +0200
- CC: busatto at wi dot leidenuniv dot nl, entry at cybertek dot co dot kr
- Organization: Cap Gemini Telecom France
Hello,
I've seen a few questions on ODBC with cygwin32, but no answer ( On Mon,
20 Apr 1998, Giorgio (busatto@wi.leidenuniv.nl) , and on Tue, 7 Apr
1998, "popori" (entry@cybertek.co.kr))
I have myself a few questions concerning the following piece of code
:"odbc.c"
**********************************************************************
#include <stdio.h>
#ifdef __CYGWIN32__
typedef signed short RETCODE;
typedef void * HENV;
extern RETCODE SQLAllocEnv(HENV * phenv);
extern RETCODE SQLFreeEnv(HENV phenv);
#else
#ifdef _WIN32
#include <windows.h>
#include <sql.h>
#include <sqlext.h>
#else
#include <iodbc.h>
#include <isql.h>
#include <isqlext.h>
#endif /* _WIN32*/
#endif /* __CYGWIN32__*/
int main()
{
HENV myHenv;
RETCODE myRetCode;
printf("Trying to allocate an environment handle.\n");
myRetCode = SQLAllocEnv( &myHenv );
printf("Return code : %x ; Handle : %x \n",myRetCode,myHenv);
myRetCode = SQLFreeEnv( myHenv );
return 0;
}
**********************************************************************
Compiled under :
Windows NT with "cl odbc.c -link odbc32.lib" (ie MSVC) it compiles
OK,
Any Unix with "gcc odbc.c -liodbc" it compiles OK,
But with CygWin32, with "gcc odbc.c -lodbc32" it doesn't work and ends
with :
C:\TEMP\cc0022121.o(.text+0x6d):odbc.c: undefined reference to
`SQLAllocEnv'
C:\TEMP\cc0022121.o(.text+0x95):odbc.c: undefined reference to
`SQLFreeEnv'
How may I use "libodbc32.a" wich is part of the CygWin32 distribution ?
If anybody ever succeeded in linking with ODBC, I would be glad to know
how...
Sincerly,
--
--- Ludovic LANGE
--- Ingénieur d'études chez Cap Gemini Telecom France
--- mailto:llange@capgemini.fr
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".