[postgis-users] Building PostGis with VC++

Charlie Savage cfis at savagexi.com
Tue Aug 28 19:41:19 PDT 2007


 > I'm not clear why it is bad to mess with another DLL's memory.  I
 > thought it
 > was just dangerous to try and free memory allocated by another DLL 
(as they
 > may have distinct heaps).  If that is the case, it should be fine to use
 > pj_get_errno_ref() to get a pointer to the pj_errno in the PROJ DLL and
 > work by reference through that pointer.
 >
 > Best regards,

Some enlightenment from 
http://www.cygwin.com/ml/cygwin/1999-12/msg00043.html (and verified in a 
couple of other posts I've come across).

    The situation is sadly different for variables.  An
extern variable, v, used in a client and defined in a
DLL must be declared like this in every client source
file that uses it:

    __declspec (dllimport) extern int v;

So I'll use the function - otherwise it will require some ugly 
dllimport/dllexport gymnastics depending on who is reusing the proj 
header files.

Charlie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070828/af7bed39/attachment.bin>


More information about the postgis-users mailing list