[Proj] Building proj.4 using Visual Studio 2008 IDE

Sjur Kolberg Sjur.A.Kolberg at sintef.no
Sat Dec 4 09:42:41 PST 2010


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 :-)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20101204/5fb90fb1/attachment.html>


More information about the Proj mailing list