Hi RDKitters,
I now have the Postgres cartridge code compiling on 64-bit Windows. I
had to add a few explicit casts to dodge C2440 compiler errors but
nothing strange there. What puzzles me are the compile errors I saw when
compiling rdkit_op.c.
rdkit.h defines SearchMolCache() like this:
void* SearchMolCache( void *cache, struct MemoryContextData * ctx,
Datum a,
Mol **m, CROMol *mol, bytea **sign);
and it is called with 6 parameters all over the place - except in
rdkit_op.c where an extra seventh NULL parameter is consistently added.
That results in a:
rdkit_op.c(75) : error C2660: 'SearchMolCache' : function does not
take 7 arguments
which makes good sense to me.
Why don't I see this error when compiling on Linux ? I first though that
it was because I am compiling in C++ mode (C mode is pretty limited when
using MSVC) but compiling rdkit_op.c in C mode still gives me:
rdkit_op.c(75) : warning C4020: 'SearchMolCache' : too many actual
parameters
Is it because gcc is more laid-back than MSVC and thinks that "hey, an
extra parameter on the stack - no worries", or what's happening here ?
Disclaimer: I don't have much C experience, only a couple of years
programming C++.
Anyway, I removed the extra NULL parameter and now it compiles. I will
post patches when I get the linking sorted out and the cartridge runs.
Cheers
-- Jan
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss