orangeduck / Corange

Pure C Game Engine
http://www.youtube.com/watch?v=482GxqTWXtA
Other
1.82k stars 199 forks source link

SDL2/SDL_mixer.h: no such file ro directory #16

Closed rpherman closed 8 years ago

rpherman commented 8 years ago

I tried make with GCC 4.8.4 on my Ubuntu 14.10 box 64-bit, and I have SDL2 and SDL2-mixer and SDL2-net previously installed including libsdl2-dev. Is it simply renaming the file to something else? SDL_mixer to SDL2-mixer? PS: I bought your book, so I was pleasantly surprised to stumble upon Corange!

In file included from ./include/casset.h:24:0,
                 from src/casset.c:1:
./include/cengine.h:32:28: fatal error: SDL2/SDL_mixer.h: No such file or directory
 #include <SDL2/SDL_mixer.h>
                            ^
compilation terminated.
make: *** [obj/casset.o] Error 1
orangeduck commented 8 years ago

Maybe they changed the header location - not sure, you can try renaming it as you say or perhaps you can check in your include folder to see what the mixer header is called.

orangeduck commented 8 years ago

Thanks for buying the book also!

rpherman commented 8 years ago

Sorry, I am new to this (that's why I bought your book ;) ). The Corange SDL2 folder has SDL_local.c, but no SDL_local.h or SDL_mixer.h. OR am I supposed to find the libsdl-dev on my machine and look for headers? Thanks!

orangeduck commented 8 years ago

Hey,

I checked and I think you just need to run sudo apt-get install libsdl2-mixer-dev and it should install the headers for the mixer library. After that you can see that SDL_mixer.h is in /usr/include/SDL2.

Hope that helps,

rpherman commented 8 years ago

Yes, doing that and libsdl2-mixer-dev too allowed it to compile. Thanks! I did the libsdl2-dev install, per the instructions on your page, but since I had SDL-mixer and SDL2-net installed, I didn't do the dev files for them. The Windows instruction note gives it away...

Now where to next? Do I just cd to a demo direcotry and do make again before I try using the framework? Thanks.

Rob

orangeduck commented 8 years ago

Yup, that should be the next step! I'll update the instructions in the README.