Comments (6)
It seems you're not linking to SDL_mixer
Hurrican can be compiled both with SDL2 (preferred) and SDL1. In any case you need the corresponding SLD_mixer and SDL_image libraries.
from hurrican.
Thank you for your reply
Just doesn't Cmake manage this to automatically configure everything to link the application correctly?
While in the case of a makefile (pure) such things are a matter of Make and the appropriate linker flags, in the case of Cmake it seems to be done automatically ...?
Cmake itself finds SDL2 libraries correctly
from hurrican.
Ok, I fixed it by manually adding libs about linker to CMAKE. I wonder why it can't by default detect it on CMakeLists ...
from hurrican.
Yes, cmake should handle this automatically:
I see you have no problems linking with SDL_image, maybe there's something wrong with the SDL_mixer cmake modules on your platform.
You can check the CMakeCache.txt file, I have this on Linux:
//Path to a file.
SDL2_MIXER_INCLUDE_DIR:PATH=/usr/include/SDL2
//Path to a library.
SDL2_MIXER_LIBRARY:FILEPATH=/usr/lib/libSDL2_mixer.so
from hurrican.
I was not able to solve this problem with your method, but I found my:
CMake Error at CMakeLists.txt:559:
Parse error. Expected a command name, got unquoted argument with text
"SDL2_MIXER_INCLUDE_DIR="/data/data/com.termux/files/usr/include/SDL2"".
target_link_libraries(${PROJECT_NAME} SDL2 SDL2_image SDL2_mixer)
In short I just add to linker info about SDL.
But I think the CMake file is little broken.
Hurrican/Hurrican/CMakeLists.txt
Line 554 in 67da195
I think this else will never be executed, because if SDL2_FOUND is true in main verification, then else should not be executed I think.
I think we can close this issue if you want, because the Termux build can handle just my patch :)
from hurrican.
But I think the CMake file is little broken.
Hurrican/Hurrican/CMakeLists.txt
Line 554 in 67da195
I think this else will never be executed, because if SDL2_FOUND is true in main verification, then else should not be executed I think.
That's the (legacy) cmake syntax, if SDL2 is found the first block is executed, if not it means that SDL1 has been found (or it would have errored out) and the second block is executed.
from hurrican.
Related Issues (20)
- Beam color is wrong in GL 1 mode HOT 1
- FBO has issues with multi-monitor setups
- CI is broken
- Configure gamepad on Linux HOT 52
- Game crashes when saving after first level HOT 11
- Handle controller device events
- Implement sound fx pitch shifting HOT 1
- Boss_MetalHead actions
- Suspicious warning when building for GLES
- Lighter CRT filter? (As previously) HOT 2
- Black screen on Raspberry Pi 4 HOT 5
- Remove obsolete Unrar support HOT 5
- Comments translation HOT 7
- Hurrican No music => SDL 2.28.4 SDL2_mixer 2.6.3 NULL ptr returned from MUSIC_LoadSong() loading song file HOT 7
- Using STL HOT 3
- DisplayLoadInfo slows down loading. HOT 4
- Conflicting licenses HOT 4
- Update GLM
- Move to SDL3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hurrican.