boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
108 stars 18 forks source link

Building on windows - scons is trying to use Mingw32 #77

Closed apwebber closed 1 year ago

apwebber commented 1 year ago

Hi,

I'm trying to build geodot on windows and getting the following output:

C:\geodot-plugin>scons platform=windows target=release osgeo_path=C:\OSGeo4W scons: Reading SConscript files ... scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... /usr/bin/x86_64-w64-mingw32-g++ /FoGeoRaster.obj /c GeoRaster.cpp /TP -std=c++17 -fPIC /nologo /IC:\OSGeo4W\include /I. /IC:\geodot-plugin\src\global The system cannot find the path specified. scons: [GeoRaster.obj] Error 1 scons: building terminated because of errors. scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... /usr/bin/x86_64-w64-mingw32-g++ /FoFeature.obj /c Feature.cpp /TP -std=c++17 -fPIC /nologo /IC:\OSGeo4W\include /I. /IC:\geodot-plugin\src\global The system cannot find the path specified. scons: [Feature.obj] Error 1 scons: building terminated because of errors. scons: done reading SConscript files. scons: Building targets ... x86_64-w64-mingw32-g++ /Fosrc\geodata.obj /c src\geodata.cpp /TP -std=c++17 /nologo /IC:\OSGeo4W\include /I. /Igodot-cpp\gdextension /Igodot-cpp\include /Igodot-cpp\gen\include /Isrc\raster-tile-extractor /Isrc\vector-extractor /Isrc /Isrc\global 'x86_64-w64-mingw32-g++' is not recognized as an internal or external command, operable program or batch file. scons: *** [src\geodata.obj] Error 1 scons: building terminated because of errors.

I'm not very familiar with scons but I have managed to build other GDExtensions without this error so my vc++ installation should be fine. I've also been able to build godot itself. Is there a reason scons is trying to use mingw32 in this case?

Windows 10, vc++ 2019 with all the components recommended in the build instructions.

kb173 commented 1 year ago

Hi! Sorry about that - we updated the README but forgot to push the change :sweat_smile: the updated instructions are there now: https://github.com/boku-ilen/geodot-plugin/tree/master#building-on-windows

For some reason, our dependencies made it really difficult to successfully build with MSVC, so we switched to only building for Windows from Linux using MinGW since that works very consistently. You can do that yourself via WSL, it should be fairly straightforward with the instructions in the README; alternatively, you can also see the actual scripted instructions here: https://github.com/boku-ilen/geodot-plugin/blob/master/.github/workflows/build-windows.yml if you don't want to make changes to Geodot and just use it, you can also just download the latest Windows build from that automated build action: https://github.com/boku-ilen/geodot-plugin/actions/workflows/build-windows.yml

I hope that helps; sorry again for the confusion, let me know if you need anything else!

apwebber commented 1 year ago

Ah no problem! Thanks for your response.

Somehow I missed the fact that there were automated builds - my bad for not reading the readme properly!