<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:inherit;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>When I tried to use proj from C# a few years back I created a wrapper library SharpProj (<a href="https://github.com/AmpScm/SharpProj.git">https://github.com/AmpScm/SharpProj.git</a>)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>All sourcecode and buildscripts that work for me are in the repository, but I’m guessing you can just use NuGet and use the latest proj directly with some of the sample code from there.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>The easiest way to build proj yourself on Windows is current most likely using vcpkg. That helps building proj and all its dependencies.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>               Bert<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> PROJ <proj-bounces@lists.osgeo.org> <b>On Behalf Of </b>Jonathan Johansen<br><b>Sent:</b> Thursday, January 5, 2023 4:08 AM<br><b>To:</b> proj@lists.osgeo.org<br><b>Subject:</b> [PROJ] Interface to PROJ from C#<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><p class=MsoNormal>Hi all!<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I'm trying to use PROJ 9.1.1 in my C# Windows project, but am not having any success. A friend has tried to use it from EasyGIS, but ran into an issue. So I thought I'd try SharpProj (<a href="https://github.com/AmpScm/SharpProj">https://github.com/AmpScm/SharpProj</a>), but I ran into <a href="https://github.com/AmpScm/SharpProj/issues/25">https://github.com/AmpScm/SharpProj/issues/25</a>. So I thought why not try to use the win DLL directly myself? So I got the 64 bit OSGeo4W from <a href="https://proj.org/install.html#windows">https://proj.org/install.html#windows</a>, and grabbed all of the DLLs in the bin folder, and have put them into my project. But it throws a similar error:<o:p></o:p></p></div><div><p class=MsoNormal>>'Unable to load DLL 'proj_9_1.dll' or one of its dependencies: The specified module could not be found.<o:p></o:p></p></div><div><p class=MsoNormal>So I thought I'd try to build the DLLS myself and use them. So I've got the 9.1.1 source code, installed cmake, started going through the first tutorial, and am trying. I'm not familiar with Linux, and I'm building on Windows (I see one entry in the mailing list from June 2022 about windows), so this is probably not going to be easy. Anyway, when trying to build it, I get this:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>>D:\Downloads\proj_build>cmake ../proj-9.1.1<br>-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.<br>-- Requiring C++11<br>-- Requiring C++11 - done<br>-- Requiring C99<br>-- Requiring C99 - done<br>-- Configuring PROJ:<br>-- PROJ_VERSION                   = 9.1.1<br>-- PROJ_ABI_VERSION               = 9_1<br>CMake Warning at cmake/ProjConfig.cmake:48 (message):<br>  Autoconf's D:/Downloads/proj-9.1.1/src/proj_config.h may interfere with<br>  this CMake build.  Run 'make distclean' in the source directory before<br>  CMake's build.<br>Call Stack (most recent call first):<br>  CMakeLists.txt:127 (include)<br><br>-- nlohmann/json: internal<br>CMake Error at CMakeLists.txt:176 (message):<br>  sqlite3 binary not found!<br><br>CMake Error at CMakeLists.txt:181 (message):<br>  sqlite3 dependency not found!<br><br>CMake Error at CMakeLists.txt:187 (message):<br>  sqlite3 >= 3.11 required!<br><br>CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):<br>  Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)<br>Call Stack (most recent call first):<br>  C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)<br>  C:/Program Files/CMake/share/cmake-3.25/Modules/FindTIFF.cmake:124 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)<br>  CMakeLists.txt:198 (find_package)<br><br>-- Configuring incomplete, errors occurred!<br>See also "D:/Downloads/proj-9.1.1/CMakeFiles/CMakeOutput.log".<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I have copied the sqlite3.exe and .dll from OSGeo4W into both folders, and it still doesn't think sqlite is there. I'll keep going through cmake tutorials to try to understand how I can satisfy it, but any help is appreciated - even better if SharpProj can be made to work. At this point I am a bit sad as I'm in over my head. I can supply a basic project trying to use the OSGeo4W DLLs too, if you'd like to look at that.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks so much for reading to this point!<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><div><div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'><tr><td style='padding:0cm 0cm 3.75pt 0cm'><p class=MsoNormal style='line-height:13.2pt'><b><span style='font-size:13.0pt;color:#333333'>Jonathan Johansen</span></b><span style='font-size:12.0pt;font-family:"inherit",serif;color:#212529'><o:p></o:p></span></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='line-height:13.2pt'><span style='font-size:13.0pt;color:#333333'>M:</span><span style='font-size:12.0pt;font-family:"inherit",serif;color:#212529'> <a href="tel:0438922553" target="_blank"><span style='font-size:13.0pt;font-family:"Calibri",sans-serif;color:#0066CC'>0438 922 553</span></a><o:p></o:p></span></p></td></tr><tr><td style='padding:0cm 0cm 7.5pt 0cm'><p class=MsoNormal style='line-height:13.2pt'><span style='font-size:13.0pt;color:#333333'>E:</span><span style='font-size:12.0pt;font-family:"inherit",serif;color:#212529'> <a href="mailto:jonathan@t3rra.com" target="_blank">jonathan@t3rra.com</a></span><span style='font-size:13.0pt;color:#5A6377'><br></span><span style='font-size:13.0pt;color:#333333'>W:</span><span style='font-size:12.0pt;font-family:"inherit",serif;color:#212529'> <a href="http://www.t3rra.com/" target="_blank">http://www.t3rra.com/</a><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></div></div></body></html>