Unresolved syms loading psqlodbc-08.00.0002's psqlodbc.so - Mailing list pgsql-odbc

From Dave Bodenstab
Subject Unresolved syms loading psqlodbc-08.00.0002's psqlodbc.so
Date
Msg-id 200502092125.j19LPjxr004924@base686.home.org
Whole thread Raw
List pgsql-odbc
Hello,

I am using FreeBSD 4.8

I have built and installed libiodbc-3.52.2
I have built and installed the sqlite3 odbc driver.
I have built psqlodbc-08.00.0002 (with the attached patch from the
libiobc folks which was needed because M$ has apparently changed
the api for their 64-bit architectures).

When I run libiodbc's iodbctest program, I can connect to a sqlite3
db successfully.

When I try to connect to a PostgreSql db, it fails.  The error is
because the symbol 'ucs2_to_utf8' is unresolved when psqlodbc.so
is loaded.

I see that win_unicode.c contains this function, so I compiled and
included it into psqlodbc.so

I then get unresolved references to either wbtoc or iswascii depending
on whether I #define HAVE_ISWASCII

I have searched FreeBSD's libc source and /usr/include for both
those names, and they are not found.

Any suggestions?

Thank you.

Dave Bodenstab


Here is the patch supplied by the libiodbc folks:

diff -wubB psqlodbc-08.00.0002/odbcapi30.c psqlodbc-08.00.0002.new/odbcapi30.c
--- psqlodbc-08.00.0002/odbcapi30.c    2004-07-21 14:29:58.000000000 +0200
+++ psqlodbc-08.00.0002.new/odbcapi30.c    2005-02-08 10:59:23.000000000 +0100
@@ -104,7 +104,7 @@
 SQLColAttribute(HSTMT StatementHandle,
                 SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
                 PTR CharacterAttribute, SQLSMALLINT BufferLength,
-                SQLSMALLINT *StringLength, PTR NumericAttribute)
+                SQLSMALLINT *StringLength, SQLLEN * NumericAttribute)
 {
     RETCODE    ret;

diff -wubB psqlodbc-08.00.0002/odbcapi30w.c psqlodbc-08.00.0002.new/odbcapi30w.c
--- psqlodbc-08.00.0002/odbcapi30w.c    2004-07-21 14:29:58.000000000 +0200
+++ psqlodbc-08.00.0002.new/odbcapi30w.c    2005-02-08 10:58:51.000000000 +0100
@@ -234,7 +234,7 @@
     SQLPOINTER        pCharAttr,
     SQLSMALLINT        cbCharAttrMax,
     SQLSMALLINT  *pcbCharAttr,
-    SQLPOINTER        pNumAttr)
+    SQLLEN    *pNumAttr)
 {
     RETCODE    ret;
     BOOL    alloced = FALSE;

--------------060801090202080304000204--


pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: FW: postgresql & iodbc HOWTO document thoughts
Next
From: Paul Cochrane
Date:
Subject: Compiling using Visual Studio 2003