[Proj] Building proj.4 using Visual Studio 2008 IDE
nicolas david
ericnico.david at gmail.com
Sat Dec 4 10:50:56 PST 2010
hi
I think you should have a look to the "Exporting from a DLL using def
files<http://msdn.microsoft.com/en-us/library/d91k01sh%28v=VS.90%29.aspx>"
pages of Visual 2008 documentation. There is a proj.def file under proj4
"src" directory which contains the function to export.
hope it's helpful
Nicolas
2010/12/4 Sjur Kolberg <Sjur.A.Kolberg at sintef.no>
>
>
> Hello,
>
>
>
> Can anyone please answer what I guess is a newbie question:
>
>
>
> I try to build proj.4 using Visual Studio 2008 IDE.
>
>
>
> By following instructions, I managed to build proj.4 using the nmake
> utility. For possibly irrational reasons, nmake is a tool I’m uncomfortable
> with, so I tried to build proj4.dll by creating VS solution and project
> files. I separated the five outputs (proj.dll, geod.exe, nad2bin.exe,
> nad2nad.exe and cs2cs) into separate VS projects.
>
>
>
> Building somehow works for proj.4, meaning that the dll is successfully
> created, but no stub library (proj_i.lib). Hence the remaining programs
> (cs2cs, nad2nad etc) either complain about proj_i.lib not found, or about
> unresolved externals. Also, DUMPBIN on the created proj.dll shows an empty
> list of exported symbols.
>
>
>
> I have specified /IMPLIB:proj_i.lib, but this is ignored by VS, apparently
> connected to the fact that nothing is exported from proj.dll. From other
> libraries, I am used to find __declspec(dllexport) at the declaration of the
> exported symbols, but there is none of the like in the proj.4 source code.
> Is this Windows or VS specific?
>
>
>
> Still the nmake utility obviously know what to export, DUMPBIN on the
> nmake-built proj.dll shows a well populated list. I have tried reading the
> .configure and makefile.vc files, but lack the skill to understand them.
>
>
>
> I guess I could read the output from DUPMBIN on the nmake-generated
> proj.dll and insert a __declspec(dllexport) in the source code declarations
> for all these symbols. Is this the only (non-nmake) way of getting these
> symbols exported from proj.4 under VS?
>
>
>
> If I #defined a PROJ_DLL inside some #ifdef to mean __declspec(dllexport)
> if (WIN32 and VS-IDE) and nothing otherwise, would anyone be interested in
> updated proj_api.h and the .sln+.vcproj files?
>
>
>
> Regards,
>
>
>
> Sjur K :-)
>
>
>
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20101204/9e742b9f/attachment.html>
More information about the Proj
mailing list