Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling Source from SDK? #205

Open
mlptownsend opened this issue Jan 10, 2023 · 2 comments
Open

Compiling Source from SDK? #205

mlptownsend opened this issue Jan 10, 2023 · 2 comments

Comments

@mlptownsend
Copy link

mlptownsend commented Jan 10, 2023

I wanted to try compiling GDAL using VS2022 x64 via the sdk from the SDK page:
https://www.gisinternals.com/sdk.php

It says at the top that you need the source from one of the development, stable, or releases sections. But I'm not sure if I'm just blind, but I cannot locate these source packages. When I click on, say, the x64 VS2022 link I don't see anything that says it's the source, just compiled binaries and headers. The rest are all MSI installers and don't indicate they're source files either. Did they go missing, or is there another step involved?

I tried just cloning a copy of the gdal repo to a gdal folder in the same directory as the SDK download. And I got this error message about FileGDB:

 Unable to find "E:\buildsystem\support\FileGDB_API_1_5_1-VS2017\lib\FileGDBAPI.lib". Set FILEGDB_API_DIR in  to the location of the FileGDB SDK

The support folder only contains regex-0.12. So I found that particular file on their github page. Then I got an error about ECW, and they seem to have changed their download structure to requiring approval to download the SDK. So I disabled ECW for now. The next error asked me to add 7z to my path.

The next error has stuck me.

found cmake in C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
found 7zip in C:\Program Files\7-Zip\7z.exe
        del c:\src\gisinternals\release-1930\build\gdal.opt
The system cannot find the path specified.
        del c:\src\gisinternals\release-1930\lib\gdal_i.lib
The system cannot find the path specified.
        echo zlib - v1.2.11 >> c:\src\gisinternals\release-1930\doc\gdal_deps.txt
The system cannot find the path specified.
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.

What is it trying to do here? Am I missing something else?

@szekerest
Copy link
Member

Good point, I'll check if the current SDK contains all items for a standalone compilation.
Theoretically you should only need a visual studio command prompt and git to compile GDAL, and type 'nmake rebuild-gdal' in the SDK root directory. The sources are downloaded automatically during the build.

@mlptownsend
Copy link
Author

Thanks for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants