Re: build WIN32 ODBC using VC++, not Cygwin/gcc

From: Fred Yankowski <fred(at)ontosys(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
Subject: Re: build WIN32 ODBC using VC++, not Cygwin/gcc
Date: 2001-02-05 19:37:06
Message-ID: 20010205133706.A24542@enteract.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc

On Mon, Feb 05, 2001 at 08:06:28PM +0100, Peter Eisentraut wrote:
> > + Run 'configure' _without_ '--with-odbc' to build PostgreSQL.
>
> I doubt you need that, since you don't use the makefiles.

I stated that point for the benefit of those, like me, who are
building all of PG from source, not just building ODBC. Using
'--with-odbc' in such a case has two problems: 1) it builds a useless
psqlodbc.dll; 2) it updates (AFAICT) psqlodbc.def to new data that
will cause a later, independent, build of psqlodbc.dll via VC++ to
fail.

> > Building with '--with-odbc' will appear to work, but the resulting DLL
> > (created by Cygwin gcc/tools) completely fails to work for me once
> > installed. (It would have been nice if the documentation gave a hint
> > about this. Or did I miss it?
>
> Something more detailed thatn "completely fails to work" might shed some
> light onto it.

I had posted earlier messages with more details (which got no response
other than from Mr. Hiroshi Inoue, who got me past the problem) so I
didn't repeat them in that message. Anyway, here's what happens when
I build psqlodbc.dll as part of a complete pgsql build, having
configured with '--with-odbc':

+ The psqlodbc.dll file appears to build OK, with no warnings (that I
recall).

+ When I overwrite my systemroot/system32/psqlodbc.dll with the one I
just built, I then can no longer access any ODBC functions for
PostgreSQL. In particular:

+ The 'PostgreSQL' driver does appear in the list of drivers in the
ODBC control panel. However, its version & company information
is not available.

+ When I select an existing System DSN using the PostgreSQL driver
and click Configure, I get the message "The setup routines for
the PostgreSQL ODBC driver could not be accessed. Please
reinstall the driver."

+ When I try to Add a new DSN using the PostgreSQL DSN, the same
message results.

+ When I try to bring up my Zope website, which employs several
ODBC connections (and is my only application using PG ODBC),
accessing that site results in an application error from
Zope/python saying "The instruction at '0x64eca3e5' referenced
memory at '0x014f3e54'. The memory could not be 'read'.".
Bringing up the VC++ debugger at that point gives me the message
"Unhandled exception in python.exe (PSQLODBC.DLL): 0xC0000005:
Access Violation".

--
Fred Yankowski fred(at)OntoSys(dot)com tel: +1.630.879.1312
Principal Consultant www.OntoSys.com fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-02-05 19:43:27 Re: build WIN32 ODBC using VC++, not Cygwin/gcc
Previous Message Vince Vielhaber 2001-02-05 19:26:00 Re: Getting Software

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2001-02-05 19:43:27 Re: build WIN32 ODBC using VC++, not Cygwin/gcc
Previous Message Peter Eisentraut 2001-02-05 19:06:28 Re: build WIN32 ODBC using VC++, not Cygwin/gcc