I'm trying to build the GDAL DLL and .lib files, so GDAL can be used for linker and includes in an other C++ project. We're needing to upgrade from GDAL 2.0.2 to 3.7.2.
Has anyone built GDAL from source before?
What did I try:
conda install -c conda-forge proj
conda install -c anaconda swig
The build should fail with an error about being unable to find a "lib.obj". File paths have been hidden.
LNK1104 cannot open file '...\anaconda3\pkgs\proj-8.2.1-h5ed7ab8_0\Library\lib.obj' gdal "...\gdal-3.7.2\target\LINK"
lib.obj does not exist at that location. I have no idea what's supposed to create it. I don't know why the "conda install" command did not place the lib file there.
I also noticed that in the variables list (the big window in the middle of the GUI), for the PROJ_DIR variable, I've got "PROJ_DIR-NOTFOUND" after I manually set it to the above 'anaconda3\pkgs' directory. It changes to "PROJ_DIR-NOTFOUND" during the configure process.
What I was expecting: The build to succeed.
GDAL 3.7.2 is available in the conda-forge repository. Why not simply run
conda install -c conda-forge gdal