<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Hello,
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I'm trying to use the GDAL libraries in C code in a mapping software to be able to read some raster and vector formats that so far, we can't open and I have doubts about how to include these libraries in the project.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">Is there a standard way to proceed or a document that explains step by step how to include them?</div>
<div class="x_ContentPasted0 ContentPasted0">And is there a way to implement them without depending on where the DLLs are and just rely on libs?</div>
<div class="x_ContentPasted0 ContentPasted0">Both 32-bit and 64-bit versions must be included.</div>
<div class="x_ContentPasted0 ContentPasted0">At the final installation of our software there are two executables in the same path, one for each type (32, 64) and I can't get it to recognize the dll's depending on which executable I'm using.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I explain how I did it if there is something wrong:</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I have downloaded the Development Kits for the MSVC 2017 compiler release-1911-dev (http://download.gisinternals.com/query.html?content=filelist&file=release-1911-dev.zip) for 32bit and release-1911-x64-dev (http://download.gisinternals.com/query.html?content=filelist&file=release-1911-x64-dev.zip)
for 64bit.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I have included the include folder as Additional Include Directories and the lib directory in Additional Library Directories. I also added gdal_i.lib to Additional Dependencies.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">At the first test I was able to compile successfully but when running it gave me a system error because it couldn't find the file gdal302.dll. This error appears this before the first line of code.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I saw that it's necessary to register several variables (PATH, GDAL_DATA, GDAL_DRIVER_PATH, PYTHONPATH and PROJ_LIB) and for each variable I added the directories listed in the SDKShell.bat file. After registration,
I checked that the variables are registered correctly in the Windows Environment Variables window and the directories are where the codes downloaded from the GDAL libraries are. For example, in the case "GDAL_DATA=%SDK_ROOT%bin\gdal-data" for 64bits, if %SDK_ROOT%
is D:\progs\x64\gdalLibs, I specified "GDAL_DATA=D:\progs\x64\gdalLibs\bin \gdal-date".</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">However, I still have some problems, especially for the 64-bit case, where testing in some cases, after the variable register, it is necessary to restart windows for it to work but it does not always happen.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">Thank you very much in advance and I look forward to hearing from you.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
P.S. I have also tried using the release-1916-dev version but I had problems compiling the project because it does not find the variables VSIIsLocal(), VSISupportsSequentialWrite() and VSISupportsRandomWrite(). As with the release-1911-dev version, I have been
able to compile the project, I have continued to use this version.<br>
</div>
</body>
</html>