Unfortunately, the Code::Blocks SDL wizard hasn't been updated since SDL changed its include file layout. Not your fault. To get by this, temporarily copy SDL.h up a level (from "SDL" to "include"). This is just to get the wizard to finish; you should then get rid of the copy and adjust any #include <SDL.h> to #include <SDL/SDL.h>.I got the wizard to make the project but when I go to compile the sample code that Code Blocks supplies it says this:
It seems this project has not yet been built. Do you want to build it?I said yes, but get this in the build log:
-------------- Build: Debug in SDL ---------------
Linking console executable: bin\Debug\SDL.exe
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file bin\Debug\SDL.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Index: src/plugins/scriptedwizard/resources/sdl/wizard.script
===================================================================
--- src/plugins/scriptedwizard/resources/sdl/wizard.script (revision 5680)
+++ src/plugins/scriptedwizard/resources/sdl/wizard.script (working copy)
@@ -47,8 +47,15 @@
local dir_nomacro_inc = GetCompilerIncludeDir(dir, SDLPathDefault, SDLPathDefaultInc);
if (dir_nomacro_inc.IsEmpty())
return false;
- if (!VerifyFile(dir_nomacro_inc, _T("SDL.h"), _T("SDL's include")))
- return false;
+
+ if (!IO.FileExists(dir_nomacro_inc + wxFILE_SEP_PATH + _T("SDL.h")))
+ {
+ if (VerifyFile(dir_nomacro_inc, _T("SDL/SDL.h"), _T("SDL's include")))
+ SDLPathDefaultInc = SDLPathDefaultInc + _T("/SDL");
+ else
+ return false;
+ }
+
// verify library dependencies
local dir_nomacro_lib = GetCompilerLibDir(dir, SDLPathDefault, SDLPathDefaultLib);
-------------- Build: Debug in SDL ---------------
mingw32-g++.exe -L"C:\Program Files\CodeBlocks\MinGW\lib" -o bin\Debug\SDL.exe obj\Debug\main.o -lmingw32 -lSDLmain -lSDL.dll -luser32 -lgdi32 -lwinmm -ldxguid
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file bin\Debug\SDL.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Here's what full command line gives:Quote-------------- Build: Debug in SDL ---------------
mingw32-g++.exe -L"C:\Program Files\CodeBlocks\MinGW\lib" -o bin\Debug\SDL.exe obj\Debug\main.o -lmingw32 -lSDLmain -lSDL.dll -luser32 -lgdi32 -lwinmm -ldxguid
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file bin\Debug\SDL.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
When I check for the EXE I can't even see the project file. What's up with that?