How much c++

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post 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.
When One learns to Love, One must bear the risk of Hatred.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post by herby490 »

Any Luck setting it up.
User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post 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.
When One learns to Love, One must bear the risk of Hatred.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post by herby490 »

What error exactly did you get.
User avatar
MadPumpkin
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 484
Joined: Fri Feb 13, 2009 4:48 pm
Current Project: Octopia
Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
Programming Language of Choice: C/++,Java,Py,LUA,XML
Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk

Re: How much c++

Post 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 :)
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
Image
Image
Image
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Wed Oct 29, 2008 7:31 am
Current Project: some crazy stuff, i'll tell soon :-)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++!
Location: The UK
Contact:

Re: How much c++

Post 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!
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: How much c++

Post 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 ;)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post by herby490 »

Maybe he is forgetting to put the proper dll files in whatever directory code::blocks requires.
User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post 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.
When One learns to Love, One must bear the risk of Hatred.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post by herby490 »

Did u put the DLL in its proper folder?
User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post by jtst1 »

I believe so. I don't have to put anything in the folder where my project is do i?
When One learns to Love, One must bear the risk of Hatred.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post by herby490 »

Its the one with all the source files and the project file is located. You should have SDL.dll in it.
User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post by jtst1 »

I put the dll in my project file didn't work.
When One learns to Love, One must bear the risk of Hatred.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: How much c++

Post 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.
User avatar
jtst1
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Tue Sep 30, 2008 4:32 pm
Location: Atlanta Georgia

Re: How much c++

Post by jtst1 »

Alright. Thanks for the help everyone :D
When One learns to Love, One must bear the risk of Hatred.
Post Reply