Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: vurentjie on March 05, 2008, 11:07:47 pm
-
hi,
i am getting a little frustrated and just need to see if i am doing anything wrong or not doing something that i should be,
i am trying to build an SDL project,
i use the following linker options
mingw32
SDLmain
SDL
opengl32
glu32
#include <SDL/SDL.h>
<have also tried>
#include "SDL.h"
#include "SDL/SDL.h"
#include <SDL.h>
</have also tried>
my SDL folder is in include folder neighbouring GL folder, etc.
my .lib are in the lib folder
i put my .dll in the windows/system folder and right now i think this might be the only thing i should change maybe slot it into the bin folder......
i created from an empty project because i don't enjoy the sdl wizard, i build and ran and it worked fine, then i included windows.h, which i suppose i didn't need to, but before i removed it, i rebuilt and something didn't work, so i removed my piece of code (and windows.h include) , and rebuilt, says cannot find SDL.h, so i check my linker and they are dropped, so i add them in again, but still get the same error.....now even if i close off code blocks and reopen and even make another new project (even just a simple one) it still can't find SDL.h,
is there anything at all that i am supposed to do
-
now i have tried to run through the wizard but when i get to option field - include(along with obj,lib) - i presume to find location of SDL when i browse to find include/SDL it is not there, only shows c++,ddk,GL and sys folders, although when i look on my pc it is definitely there, whats up? i have even reinstalled code::blocks and recopied all my SDL files....
what do i do now?
-
Hi !
Did you correctly set the search directories in the project build options ?
Dje
-
what exactly would my search params be, would they be
C::B/Mingw/include
C::B/Mingw/lib
C::/Mingw/bin
or just C::B/Mingw
thanks
-
As far as know on Windows, it is impossible to put ':' in paths.
I don't see how you have created your C::B paths.
I just mean that the include directory of your SDL lib should be referenced in the compiler tab of your search directories project build options.
Same thing for SDL libs and linker search directories.
Dje
-
no i didnt really do that, that is just a slack-ass typing, my folder is CodeBlocks/....sorrry for the confusion.
anyhow i seem to have found another thread that address the issue, but would still like some advice, hopefully this is ok.
so after digging around a bit i realized why it wasn't picking up SDL in my includes, this is because i had a devC installation with mingw folder as well, without any SDL folder in it, c::b was looking there for my compiler, so now i removed devc entirely, but when i try to build it says nothing to do, and something like 'no active compiler', so it is not finding MingW that comes with c::b, but as i said another thread is talking about this, so i will follow whats going on there and in the meantime see if i can fix this,.....
-
ok finally i got it to work,
found the global settings for my compiler, and used auto-detect, since i only have one mingw installation on my pc now, and finally it works again,
thanks