Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error building GDAL: PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency

I am trying to get GDAL 3.0.1 to work. Generating the Visual Studio 2017 project was a piece of cake, all I needed was to run generate_vcxproj.bat. But now I'm getting an error on this line of makefile.vc:

!IF !DEFINED(PROJ_INCLUDE)
!ERROR PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency
!ENDIF

What's that all about? If I am meant to define PROJ_INCLUDE, what value should it have? Is that even preprocessor define?

like image 370
Tomáš Zato - Reinstate Monica Avatar asked Aug 21 '19 23:08

Tomáš Zato - Reinstate Monica


2 Answers

The error is confusing because PROJ sounds like shortened "project". But it is, in fact, a dependency on the PROJ library. I installed it through OSGeo as recommended in installation instructions.

After that, fill in the paths to installed libs into nmake.opt:

# PROJ stuff (required dependency: PROJ >= 6)
PROJ_INCLUDE = -IC:\OSGeo4W64\proj
PROJ_LIBRARY = C:\OSGeo4W64\lib\proj_5_2.lib
like image 165
Tomáš Zato - Reinstate Monica Avatar answered Nov 15 '22 05:11

Tomáš Zato - Reinstate Monica


If I could've comment, it would be one:

I think, you gave an incorrect Include path:

PROJ_INCLUDE = -IC:\OSGeo4W64\include

would be the correct one. Also it claims, it needs PROJ version >=6, but it's 5.2 if I'm not mistaken. Didn't you had problems with inclusion of proj_experimental.h?

like image 30
Bgnr Avatar answered Nov 15 '22 05:11

Bgnr