Closed SandroWissmann closed 1 year ago
Do you maybe have an idea @crudelios ?
I tried the change but still gives this:
That means it found the headers and not the libraries. It's an improvement!
I'll see what else needs doing.
It works now. I deleted the build folder and added one by one under ext/SDL2 the files.
I then could just run
cmake .. -G "MinGW Makefiles"
@Banderi Can you check out this branch and try to build like this:
unpack it under ext/SDL2
probably you need to do the same for SDL2 and mixer.
In the end it looks like this:
then delete your build folder
then
mkdir build cd build cmake .. -G "MinGW Makefiles"
It should work now out of the box without specify LIB.
I would also add one more commit to describe these steps in the readme so other people can get it to tun. For now it looks like we have these both ways. Still no clue why it still does not work with the lib way...
actually now both ways work after delete clean the build folder:
Either with
cmake -DCMAKE_PREFIX_PATH=LIB64 -DYSTEM_LIBS=false .. -G "MinGW Makefiles"
or just cmake .. -G "MinGW Makefiles"
with the fixed branch. if you supply in ext/SDL2 all SDL2 Mixer and Image.
The question which way we want to use here. Or just keep both for now and I will document it.
That works too for me! Better to have it all in ext as it was originally with the other libs, so I can finally remove the LIB folder. I'll test asap!
Ok I will just add one more commit to update the readme how to build under windows / linux for other people who maybe want to build it and then from my site we could merge this. I will let you know.
Ok I added one more commit with instructions how to build in the Readme. Please check it. Then you can merge it from my point of view.
I'm testing the files with the ext
folder procedure (might need to clean up the README typos a bit btw, the links are also broken!), but it can not find SDL2_image for some reason. The rest - at least SDL2 related libs - it finds just fine:
Downloaded from here and all together is as such:
stupid question.
Are you on the branch windows-sdl2_image-fix?
There the image cmake should be updated now and make it work.
Also delete the build folder complete and try again. The error looks exactly like the one I had before I deleted it.
I can check fix it maybe today afternoon.
My bad I forgot to push the change
GET_SDL_EXT_DIR(SDL_EXT_DIR "image")
@crudelios suggested.
I force pushed it now. You can fetch the whole branch again.
Probably you have to reset it from origin like this:
git checkout master git pull git checkout windows-sdl2_image-fix git reset --hard origin/windows-sdl2_image-fix
and then try out again. Hopefully it works. The readme I fix then tonight after work.
Cleaned up and pulled, now it finds everything and CMake generates correctly, however the build fails as it can not find SDL_image.h
:
SDL_mixer.h
and the rest are found and included correctly where needed.
And no worries about the README, I will also update the build instructions myself after merging!
Yep, now it works! -- note also that with newer SDL version it will fail to build because I haven't fixed the USE_RENDER_GEOMETRY
functions, so just to quickly compile for the moment you need to disable it.
Maybe you can just add these changes to make it work to the branch. If not I can also add them when fix the readme later today.
I was actually curious if that could be done. Github shows "Add more commits to this pull request" but I thought just as you can't push to my master, I couldn't push to your fork/branch (unless permissions allowed it I imagine). What's the correct way to do it?
EDIT: Nevermind, I guess Github automatically gives permission to a PR branch. That's neat to know! If you don't mind, I'll go ahead and fix the README as well right away!
Ok no problem for me. I will try out the branch again with your fix if it builds and after that I think you could merge it.
Ok I can confirm that building works now with your last commit. Just the readme needs to be still fixed for the links not working.
Doi I do it or do you want to do it. There are just two extra "." in two links which need to be removed then it should work.
Yep I'm fixing it right now, also cleaning up the syntax/grammar and expanding the instructions for the needed dynamic libraries required for running the engine. Will merge as soon as I'm done!
perfect after this is done i will build my other pull reqeusts and also try them out on windows.
I tried to adapt cmake/FindSDL2_image.cmake and CmakeLists.txt in main folder so it can properly find SDL2_image.
I also put the SDL_Image in the SDL2 image:
Now I tried to build on windows with:
Which untortunately still givesd us this error: