[postgis-devel] Re: [postgis-users] MSVC Patch #1

Mateusz Loskot mateusz at loskot.net
Mon Oct 29 12:37:56 PDT 2007


Mark Cave-Ayland wrote:
> On Mon, 2007-10-29 at 18:07 +0100, Mateusz Loskot wrote:
>>
>> No, unfortunately the situation is the same as with the headers above.
>> That's also the reason why we added custom implementation of rounding
>> functions with Sandro to GEOS:
>>
>> http://svn.refractions.net/geos/trunk/source/util/math.cpp
> 
> OK so it looks as if we need to include a version of this function
> anyway.

Mark,

Yes.

>> In GDAL, we use separate config.h files.many features, then
> 
> Yes. I think the next step would be for Charlie to bring these options
> together in a one or two header files and resubmit a patch with just the
> header changes (this should easier since I've committed the bulk of the
> C changes).

It seems.

>> I hope my notes are helpful, but I'm here if you have more questions
>> or want me to test something with Visual C++ 2005.
> 
> Yes indeed. My only other outstanding question was there was an
> liblwgeom.def exports file provided as part of the patch - can this not
> be generated automatically?

Perhaps it can be generated but there are no tools in VC++ for that.
The only way I know to semi-automatically generate .def files is using
dumpbin utility to get exports from existing .dll file.
See section "Creating a .DEF file":

http://support.microsoft.com/kb/131313


> Or does it require adding DLLEXPORT definitions to each function?

This is yet another approach for exporting symbols from .dll.
Generally, there are two options, using Module Definition File (.def)
and using _declspec(dllexport) declaration specifier.
Here is more about these two options.

http://msdn2.microsoft.com/en-us/library/z4zxe9k8(VS.80).aspx

So, there are two different options.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the postgis-devel mailing list