Reputation: 11
I'm having some issues getting a CHIP-8 interpreter to compile. Upon pressing ctrl+f9 to compile I am met by a message saying "Build ended with errors. Continue?".
Checking the build log reveals the following error: C:/Workspace/****/****/main.c:4:17: fatal error: sdl.h: No such file or directory
I have tried copying SDL.h into the source directory, that did not work.
I tried making a directory in source called "SDL" (src/SDL/SDL.h), did not work.
I also tried making a folder next to src, (SDL/SDL.h). That did not work either.
After that I tried #include <.SDL.h>, #include <.sdl.h>, #include <.SDL.dll> and #include <.sdl.dll> (ignore the period after the "<" symbol)
I have also tried copying over the files for SDL version 1.2.15 and SDL version 2.0.3. That did work either.
Am I doing something fundamentally wrong? How do I get this to compile?
Upvotes: 0
Views: 14549
Reputation: 6674
Here's a step-by-step on how to get SDL1.2.5 working with codelite:
C:\mysdl
C:\mysdl\include
C:\mysdl\lib\
-lSDL -lSDLmain -lmingw32 -mwindows
(case-matters)C:\mysdl\bin\SDL.dll
to C:\WINDOWS\SYSTEM32
or if 64-bit C:\Windows\SysWOW64
#include "SDL\SDL.h"
or #include "SDL.h"
depending on how you configure your directory structure. Upvotes: 1
Reputation: 613
You have to say your compiler where sdl.h lives, with -I/path/to/sdl
switch on gcc or filling Include Path
in msvc
(don't move it, as it (sdl.h) will probably needs other header files)
Upvotes: 1