sokol-samples: Incorrect subsystem on windows with VS2022
Just following the basic guide:
> mkdir ~/scratch
> cd ~/scratch
> git clone https://github.com/floooh/sokol-samples
> cd sokol-samples
> ./fips set config sapp-d3d11-win64-vstudio-debug
> ./fips build
=> error LNK2019: unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
The reason is that the main hijack is not working, because it’s being overridden by the project subsystem, which is set to Console (instead of NotSet).
<Link>
...
<SubSystem>Console</SubSystem>
</Link>
If I change the SubSystem to Windows or NotSet then it works, but it would be nice if the tool could do it automatically, of if the hijack could override that setting.
About this issue
- Original URL
- State: open
- Created 9 months ago
- Comments: 18 (12 by maintainers)
Ok, one last thing before I hit the sack:
Can you add a couple of debug-messages to the fips directory that’s been checked out next to sokol-samples:
…in
fips/cmake/fips.cmakearound line 164:… then run
fips genin the sokol-samples directory. Here it looks like this:I basically want to check if windows.cmake is actually included.
Btw, can you also check this project:
https://github.com/floooh/pacman.c
This isn’t using my fips cmake wrapper but a regular CMakeLists.txt instead. Build instructions are in the readme. If this also fails (which I don’t expect), then it would be some incompatibility between cmake and the latest VS (unlikely though).