Build my plugin with GDAL

For any question about plugins!
Post Reply
petrb
Posts: 3
Joined: Tue Feb 21, 2017 10:20 pm

Build my plugin with GDAL

Post by petrb »

Hi Daniel,
I'm trying to rebuild my older plugin for new CC 2.12.alpha. I need GDAL for raster calculations in my plugin.
I can't build it when CMake OPTION_USE_GDAL is enabled.
Without GDAL other parts of the plugin can be built.

I set GDAL paths (bin, include, library) on my GDAL 2.1.3 directory:
GDAL_BIN_DIR: G:/cc/gdal_2_1_3/include/../bin
GDAL_INCLUDE_DIR: G:/cc/gdal_2_1_3/include
GDAL_LIBRARY: G:/cc/gdal_2_1_3/lib/gdal_i.lib

(I have only "include" and "lib" directories. "Bin" directory set automatically, but this directory is not on the disk.)

Please, can you advise me where the mistake might be?
Maybe the wrong version of GDAL? (BIN directory is missing.)
Where can I download right version of compiled GDAL?
I can't find it.

I'm testing it with VS2017, I have build CC 2.12.alpha from VS project INSTALL.
If I want build INSTALL project with GDAL support, I have this error:

Code: Select all

MSB3073 The command setlocal:
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd byl ukončen s kódem 1.	
INSTALL	C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets	138	
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Build my plugin with GDAL

Post by daniel »

On my side I get it from https://www.gisinternals.com/.

And I'm currently linking against gdal 2.2.1 (because of a conflict with the Faro SDK...)
Daniel, CloudCompare admin
petrb
Posts: 3
Joined: Tue Feb 21, 2017 10:20 pm

Re: Build my plugin with GDAL

Post by petrb »

Thank you, I found the library with your help, I set right path to BIN folder and the problem is solved.
Post Reply