-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
SDL2 not defined by default on linux #920
Comments
Both should work, but since we're using <SDL2/SDL.h> in the line above, and also use <SDL2/SDL_vulkan.h> in wiGraphicsDevice_Vulkan.cpp, I think that's a good change (you should also update imgui_impl_sdl.cpp)
How did you compile the linux_template? I compiled it around 2 days ago in an arch chroot and it worked out of the box. |
$ git clone git@github.com:turanszkij/WickedEngine
$ cd WickedEngine/Template_Linux
$ cmake -S . -B build
$ cmake --build build -j 12
[ 50%] Building CXX object CMakeFiles/Template_Linux.dir/main.cpp.o
In file included from /home/tonitch/WickedEngine/Template_Linux/main.cpp:1:
/home/tonitch/WickedEngine/Template_Linux/stdafx.h:2:10: fatal error: WickedEngine.h: No such file or directory
2 | #include "WickedEngine.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Template_Linux.dir/build.make:76: CMakeFiles/Template_Linux.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Template_Linux.dir/all] Error 2
make: *** [Makefile:91: all] Error 2 as I installed wickedengine on my system using the aur I made myself so error is expected
|
System
Archlinux x64
Problem
SDL2 is not defined by default.
WickedEngine/WickedEngine/wiPlatform.h
Lines 33 to 37 in 99c1d78
SDL2 is then never included and compilation is not possible
step to reproduce
With the simpliest program and compilation:
I don't like cmake that much but I tried to compile the linux_template and got the same error.
Solution
I think Line 33 should be checking PLATFORM_LINUX or SDL2 Should be set before hand on linux plateform.
Workaround and problem #2
I compile using
$ g++ main.cpp -DSDL2
and gotSolution
line 35 should be
#include <SDL2/SDL_vulkan.h>
Conclusion
I could make a pr about that but I just discovered the project and I would like your input on that. maybe I'm just missing something but this feels like a tiny bug more than anything to me ^^
The text was updated successfully, but these errors were encountered: