Using Windows XP, VC 2003, and Sybase 12.5. I have the SYBASE environment variable set. Doing a
python setup.py build
I end with the link error below. A little hunting around appears to show that this is related to whether or not CS_DATE_TYPE is defined. I cannot figure out what is supposed to define this variable.
-- BEGIN PASTE
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:C:\Program Files\Sybase125\OCS-12_5\lib" /LIBPATH:c:\Python25\libs /LIBPATH:c:\Python25\PCBuild libblk.lib libct.lib libcs.lib /EXPORT:initsybasect build\temp.win32-2.5\Release\blk.obj build\temp.win32-2.5\Release\databuf.obj build\temp.win32-2.5\Release\cmd.obj build\temp.win32-2.5\Release\conn.obj build\temp.win32-2.5\Release\ctx.obj build\temp.win32-2.5\Release\datafmt.obj build\temp.win32-2.5\Release\iodesc.obj build\temp.win32-2.5\Release\locale.obj build\temp.win32-2.5\Release\msgs.obj build\temp.win32-2.5\Release\numeric.obj build\temp.win32-2.5\Release\money.obj build\temp.win32-2.5\Release\datetime.obj build\temp.win32-2.5\Release\date.obj build\temp.win32-2.5\Release\sybasect.obj /OUT:build\lib.win32-2.5\sybasect.pyd /IMPLIB:build\temp.win32-2.5\Release\sybasect.lib
Creating library build\temp.win32-2.5\Release\sybasect.lib and object build\temp.win32-2.5\Release\sybasect.expdatabuf.obj :
error LNK2019: unresolved external symbol _date_datafmt referenced in function _databuf_allocbuild\lib.win32-2.5\sybasect.pyd :
fatal error LNK1120: 1 unresolved externalserror: command '"c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"' failed with exit status 1120
-- END PASTE
Logged In: YES
user_id=2152
Originator: YES
The offending code is line 102 in databuf.c. The context is
#ifdef HAVE_DATETIME
} else if (pydatetime_check(obj)) {
datetime_datafmt(&self->fmt, CS_DATETIME_TYPE);
} else if (pydate_check(obj)) {
date_datafmt(&self->fmt);
#endif
but if CS_DATE_TYPE has not been defined then date_datafmt() does not exist. Removing the offending lines resulted in a successful build, though I am not sure what the effect of not having pydate included might be. An initial run of the software succeeded.
The problem has been corrected in the trunk. It will be corrected in next version 0.40.