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

support.mn at elisanet.fi support.mn at elisanet.fi
Sun Dec 5 03:24:25 PST 2010


Hello,

just collect all source files together and create a library.. you don't need any
make files as long as you have all needed included and compiled in the
library. Then create dependency for your main project which uses that library.

Read VC documentation about how to create libraries. Proj4 is just as
any other library.

Regards: Janne.

-------------------------------------


Sjur Kolberg [Sjur.A.Kolberg at sintef.no] kirjoitti: 
> 
> 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




More information about the Proj mailing list