1

I just can't get the latest GDAL release running with Visual Studio 2019. Creating the VS project is no problem. Pretty straight forward. But when I try to build the project in VS in fails and gives me this error:

PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency

Of course I found this question here: https://stackoverflow.com/questions/57600419/error-building-gdal-proj-include-should-be-defined-proj-6-is-a-required-dep

But that doesn't solve the problem. I tried downloading proj with OSGeo4w and I modified the nmake.opt file accordingly.

I tried every link I could find on google but with no luck. The GDAL community seems to be aware of that but maybe just don't care?

What can I do? Or do I have to use an older GDAL 2.x version (which seems to work) ...

1 Answer 1

2

I use VS2019 16.8.3 and added a nmake.local file with:

# nmake.local
# see: https://stackoverflow.com/questions/57600419/error-building-gdal-proj-include-should-be-defined-proj-6-is-a-required-dep
#####################################################################################

PROJ_INCLUDE = -IE:\Repos\proj-6.3.2\src
PROJ_LIBRARY =   C:\OSGeo4W64\lib\proj.lib

Only 2 warnings:

1>gdal_version.h(25): warning RC4011: identifier truncated to 'DO_NOT_DEFINE_GDAL_RELEASE_DATE'
1>gdal_version.h(25): warning RC4011: identifier truncated to 'DO_NOT_DEFINE_GDAL_RELEASE_DATE'

Perhaps a bug in RC.EXE. It truncates DO_NOT_DEFINE_GDAL_RELEASE_DATE_AND_GDAL_RELEASE_NAME to 31 chars!

1
  • I thought I had done that already. What I have done differently now is the following: Download the proj.lib with OSGeo4W64 installer. Download the sourcecode for proj directly from their github (checking the "install-source" oprion in the 'OSGeo4W64' installer did not help at all. And I had to add this flag to the nmake.local file as well: WIN64=YES Even tough I created the project withtin VS2019 in 64 Bit mode .. But now it works!
    – Leo.1906
    Jan 6, 2021 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.