Page 3 of 4
Re: How much c++
Posted: Wed May 06, 2009 5:37 pm
by jtst1
I redid the first, and still got the error. But I don't know what it wants me to do for the second tutorial.
Re: How much c++
Posted: Wed May 06, 2009 6:00 pm
by herby490
Any Luck setting it up.
Re: How much c++
Posted: Wed May 06, 2009 6:04 pm
by jtst1
Nope. Still working on it.
Edit-------
Ok so I followed the tutorials and I think got everything right, but to make sure I copied the source from a lazyfools tut number 2, and got compile errors...A syntax error, undeclared. This is a serious pain in the ass.
Re: How much c++
Posted: Wed May 06, 2009 7:41 pm
by herby490
What error exactly did you get.
Re: How much c++
Posted: Wed May 06, 2009 11:19 pm
by MadPumpkin
jtst1 wrote:This is a serious pain in the ass.
check if it is in the right folder, i know that when you install SDL it makes a folder with SDL specific stuff, do NOT put the SDL_image files in that folder, put then just in lib, and bin etc. ( NOT the subfolders that SDL created )
good luck mon ami
Re: How much c++
Posted: Thu May 07, 2009 3:35 am
by programmerinprogress
jtst1 wrote:Anyone know how to install sdl for codeblocks? I tried a couple tutorials, but none seemed to work.
I do :D
1. download the SDL_Development libraries and plonk them into a folder you know where they are.
2. at the code::blocks start page go to
Settings->compiler and debugger
3. go to the
linker Settings tab and then click the
Add button
4. find the directory you installed SDL and add
libSDL_main.a and
libSDL.DLL.a
5. when you're back at the linker settings section, on the right panel, enter
-lSDL and
-lSDLmain
6. go to the
search directories tab
7. go to the
compiler tab within the that tab and click
add
8. search for the directory called
include/SDL and add that
9. go to the
linker tab within the
search directories tab and click add
10. search for the
/lib folder where you copied your SDL files to
11. BAM! you're ready to go, this is a global setup, so all you need to do now is set up a project and
#include SDL.h each time you want to use it
I hope this was clear enough.
EDIT: the same principle goes for all SDL libraries, you just search for different directories and add different lib files
EDIT 1.1: also, when you need to add those -lSDL things for extension libraries, just remember that they all follow a standard format, so libSDL_image would be -lSDL_image and mixer is -lSDL_mixer
if you follow those instructions, I don't think you'll have any problems (or at least setup related problems), if you keep doing it, it becomes second nature in the end!
Re: How much c++
Posted: Thu May 07, 2009 3:16 pm
by dandymcgee
-1sdL_image
That might just be a typo, but the number "1" in that should be a lowercase letter "L" which stands for "library".
-lSDL_image
Re: How much c++
Posted: Thu May 07, 2009 4:46 pm
by herby490
Maybe he is forgetting to put the proper dll files in whatever directory code::blocks requires.
Re: How much c++
Posted: Thu May 07, 2009 4:50 pm
by jtst1
programmerinprogress wrote:jtst1 wrote:Anyone know how to install sdl for codeblocks? I tried a couple tutorials, but none seemed to work.
I do :D
1. download the SDL_Development libraries and plonk them into a folder you know where they are.
2. at the code::blocks start page go to
Settings->compiler and debugger
3. go to the
linker Settings tab and then click the
Add button
4. find the directory you installed SDL and add
libSDL_main.a and
libSDL.DLL.a
5. when you're back at the linker settings section, on the right panel, enter
-lSDL and
-lSDLmain
6. go to the
search directories tab
7. go to the
compiler tab within the that tab and click
add
8. search for the directory called
include/SDL and add that
9. go to the
linker tab within the
search directories tab and click add
10. search for the
/lib folder where you copied your SDL files to
11. BAM! you're ready to go, this is a global setup, so all you need to do now is set up a project and
#include SDL.h each time you want to use it
I hope this was clear enough.
EDIT: the same principle goes for all SDL libraries, you just search for different directories and add different lib files
EDIT 1.1: also, when you need to add those -lSDL things for extension libraries, just remember that they all follow a standard format, so libSDL_image would be -lSDL_image and mixer is -lSDL_mixer
if you follow those instructions, I don't think you'll have any problems (or at least setup related problems), if you keep doing it, it becomes second nature in the end!
Thanks man I did everything, I think correctly. I got no compile errors, only this
"Linking console executable: bin\Debug\blaaah.exe
mingw32-g++.exe: and: No such file or directory"
grrr.
Re: How much c++
Posted: Thu May 07, 2009 5:02 pm
by herby490
Did u put the DLL in its proper folder?
Re: How much c++
Posted: Thu May 07, 2009 5:06 pm
by jtst1
I believe so. I don't have to put anything in the folder where my project is do i?
Re: How much c++
Posted: Thu May 07, 2009 5:10 pm
by herby490
Its the one with all the source files and the project file is located. You should have SDL.dll in it.
Re: How much c++
Posted: Thu May 07, 2009 5:15 pm
by jtst1
I put the dll in my project file didn't work.
Re: How much c++
Posted: Thu May 07, 2009 5:19 pm
by herby490
Hmm are you linked correctly by adding -lmingw32 -lSDLmain -lSDL to the linker box. If so did you give the directory to the lib files and if you did that I would try reinstalling SDL.
Re: How much c++
Posted: Thu May 07, 2009 5:25 pm
by jtst1
Alright. Thanks for the help everyone :D