Problem
After doing:
# vcpkg setup
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
$env:VCPKG_ROOT = "path\to\vcpkg"
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"
# gecko setup
git clone --recurse-submodules https://github.com/JanSimek/gecko.git
cd gecko
vcpkg.exe integrate install
vcpkg.exe install --triplet x64-windows sfml
I encounter this error in Visual Studio 2022
Severity Code Description Project File Line Suppression State
Error CMake Error at /vcpkg/scripts/buildsystems/vcpkg.cmake:908 (_find_package):
Could not find a configuration file for package "SFML" that is compatible
with requested version "2.5".
The following configuration files were considered but not accepted:
/vcpkg/installed/x64-windows/share/sfml/SFMLConfig.cmake, version: 3.0.2 /vcpkg/scripts/buildsystems/vcpkg.cmake 908
Solution 1: downgrade SFML
I created gecko/vcpkg.json
{
"dependencies": [
"sfml"
],
"builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc",
"overrides": [
{
"name": "sfml",
"version": "2.5.1"
}
]
}
(builtin-baseline is a commit hash which I carelessly copied from the documentation, but is luckily old enough to include sfml 2.5)
Then I ran:
cd gecko
vcpkg.exe install --triplet x64-windows
Which installs to gecko/vcpkg_installed and won't be found unless gecko/CMakePresets.json is also added:
{
"version": 2,
"configurePresets": [
{
"name": "vcpkg",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}
(documentation)
Consequently the Environment Variable must now be permanently set so that VS sees it.
After restarting VS 2022 I was finally able to use Build >Build All.
Then I ran gecko/build/src/geck-mapper.exe.
I was prompted to select the resources directory.
I was prompted to selected a .map file.
Looks fine visually:
The console shows some errors though.
[info] Map has 1 elevation(s)
[info] Loading tiles at elevation 0
[info] Loading map scripts
[info] ... script section System has 0 scripts
[info] ... script section Spatial has 2 scripts
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[info] ... script section Timer has 0 scripts
[info] ... script section Item has 43 scripts
[error] Unknown script PID = 32
[error] Unknown script PID = 110
[error] Unknown script PID = 101
[info] ... script section Critter has 39 scripts
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[error] Unknown script PID = 204
[info] Loading 3182 map objects
[info] ... loading 3182 map objects on elevation 0
[info] Using default map elevation 0
[info] ... map file parsed in 3.89 seconds
[info] ... tile textures loaded in 0.396 seconds
[info] ... objects loaded in 3.79 seconds
[info] =======================================
[info] Map loader finished after 8.08 seconds
[info] Map sprites loaded in 3.97 seconds
Solution 2 : upgrade gecko to use SFML 3.0.2
I did not investigate this, I expect these downsides:
- it's a new major version, so migration might not be trivial
- this needs additional maintenance every time SFML receives a new version
Other info
I'm using Windows 10 Pro 19045.5679
Problem
After doing:
I encounter this error in Visual Studio 2022
Solution 1: downgrade SFML
I created
gecko/vcpkg.json{ "dependencies": [ "sfml" ], "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc", "overrides": [ { "name": "sfml", "version": "2.5.1" } ] }(
builtin-baselineis a commit hash which I carelessly copied from the documentation, but is luckily old enough to include sfml 2.5)Then I ran:
Which installs to
gecko/vcpkg_installedand won't be found unlessgecko/CMakePresets.jsonis also added:{ "version": 2, "configurePresets": [ { "name": "vcpkg", "generator": "Ninja", "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" } } ] }(documentation)
Consequently the Environment Variable must now be permanently set so that VS sees it.
After restarting VS 2022 I was finally able to use
Build >Build All.Then I ran
gecko/build/src/geck-mapper.exe.I was prompted to select the resources directory.
I was prompted to selected a .map file.
Looks fine visually:
The console shows some errors though.
Solution 2 : upgrade gecko to use SFML 3.0.2
I did not investigate this, I expect these downsides:
Other info
I'm using Windows 10 Pro 19045.5679