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

Поиск
Список
Период
Сортировка
От Fred Yankowski
Тема Re: [HACKERS] build WIN32 ODBC using VC++, not Cygwin/gcc
Дата
Msg-id 20010205133706.A24542@enteract.com
обсуждение исходный текст
Ответ на build WIN32 ODBC using VC++, not Cygwin/gcc  (Fred Yankowski <fred@ontosys.com>)
Список 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@OntoSys.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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Fred Yankowski
Дата:
Сообщение: build WIN32 ODBC using VC++, not Cygwin/gcc
Следующее
От: Dave Page
Дата:
Сообщение: RE: Hello