Psycopg 2.0.9 on Windows

Patrick Hartling <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Has anyone used Psycopg 2.0.9 on Windows? I just tried to build it, and I 
get linker errors about the symbols _isinf and _isnan being unresolved. This 
is with Python 2.6 and Visual C++ 9.0 SP 1. When compiling the source, I get 
these warnings from adapter_pfloat.c:

psycopg\adapter_pfloat.c(42) : warning C4013: 'isnan' undefined; assuming 
extern returning int
psycopg\adapter_pfloat.c(44) : warning C4013: 'isinf' undefined; assuming 
extern returning int

Then, when linking the extension module, the linker tells me this:

    Creating library build\temp.win32-2.6\Release\psycopg\_psycopg.lib and 
object build\temp.win32-2.6\Release\psycopg\_psycopg.exp
adapter_pfloat.obj : error LNK2019: unresolved external symbol _isinf 
referenced in function _pfloat_str
adapter_pfloat.obj : error LNK2019: unresolved external symbol _isnan 
referenced in function _pfloat_str
build\lib.win32-2.6\psycopg2\_psycopg.pyd : fatal error LNK1120: 2 
unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\BIN\link.exe"' failed with exit status 1120

It appears that the MS extension functions _isnan() and _finite() from 
MSVC's float.h could be used to fix this case.

  -Patrick


-- 
Patrick L. Hartling
Senior Software Engineer, Priority 5
http://www.priority5.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.