hi<br><br>I think you should have a look to the "<a href="http://msdn.microsoft.com/en-us/library/d91k01sh%28v=VS.90%29.aspx">Exporting from a DLL using def files</a>" pages of Visual 2008 documentation. There is a proj.def file under proj4 "src" directory which contains the function to export.<br>
<br>hope it's helpful<br><br>Nicolas<br><br><div class="gmail_quote">2010/12/4 Sjur Kolberg <span dir="ltr"><<a href="mailto:Sjur.A.Kolberg@sintef.no">Sjur.A.Kolberg@sintef.no</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="NO-BOK"><div><p class="MsoNormal"> </p><p class="MsoNormal">Hello,</p><p class="MsoNormal"> </p><p class="MsoNormal"><span lang="EN-US">Can anyone please answer what I guess is a newbie question:</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">I try to build proj.4 using Visual Studio 2008 IDE.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal">
<span lang="EN-US">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.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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 <a href="http://makefile.vc" target="_blank">makefile.vc</a> files, but lack the skill to understand them.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Regards,</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Sjur K :-)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p></div></div><br>_______________________________________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br></blockquote></div><br>