Code::Blocks Forums

User forums => Help => Topic started by: Newbie C++ on October 10, 2010, 11:51:43 pm

Title: Using Code Block for First time?
Post by: Newbie C++ on October 10, 2010, 11:51:43 pm
Hello everyone

I have install Code Block and do I have install the C++ Complier somewhere?

I going to used Code block for SDL programming...

Is there Code Block Tutorial showing me how to install C++ Complier and also SDL too?

Title: Re: Using Code Block for First time?
Post by: Folco on October 11, 2010, 12:55:10 am
I think your OS is Open Solaris, isn't it ?
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 11, 2010, 01:24:33 am
My OS is Window 7 Ultimate :)

Title: Re: Using Code Block for First time?
Post by: Folco on October 11, 2010, 09:46:36 am
Ok, this helps. :)

You have two choices :
- Install Code::Blocks and a compiler separately (so download codeblocks-10.05-setup.exe, and a compiler of your choice)
- Install Code::Blocks and MinGW + gcc + all the stuff you need (so download codeblocks-10.05mingw-setup.exe which contains a compiler etc...)

Both are available on the download page : http://www.codeblocks.org/downloads/26
If you have installed codeblocks-10.05mingw-setup.exe, you already have GCC/G++ installed. :)

For SDL, I recommend you to look at the official site and at their FAQ.
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 12, 2010, 01:03:01 am
thank you :)

I was doing Console Applacations tutorial (there is links below it)

http://www.cprogramming.com/code_blocks/

but i just got one error saying

Id.exe - cannot find lSDLmain

what does that mean?
Title: Re: Using Code Block for First time?
Post by: Folco on October 12, 2010, 01:26:47 am
Did you read the doc here ? http://www.libsdl.org/
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 14, 2010, 07:28:33 pm
here what i have done

(http://www1.picturepush.com/photo/a/4358794/640/4358794.png) (http://picturepush.com/public/4358794)

when I run the program and i get the error like this :(

(http://www5.picturepush.com/photo/a/4358798/640/4358798.png) (http://picturepush.com/public/4358798)
Title: Re: Using Code Block for First time?
Post by: MortenMacFly on October 14, 2010, 09:09:38 pm
when I run the program and i get the error like this :(
(http://www5.picturepush.com/photo/a/4358798/640/4358798.png) (http://picturepush.com/public/4358798)
Well - the linker clearly tells you what's wrong: It cannot find the library you are asking to link against. So you need to provide the path with to library to the linker under "search directories". While you are at it, move the libraries to the right place under "link libraries" and not "other linker options".
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 15, 2010, 05:11:53 pm
the Console app work great :)  Thank you :)

I am working on SDL images but I get the error saying this
(http://www1.picturepush.com/photo/a/4362234/640/4362234.png) (http://picturepush.com/public/4362234)

what I am doing wrong?
Title: Re: Using Code Block for First time?
Post by: stahta01 on October 15, 2010, 05:38:50 pm
This is just a guess; but is the SDL Library you installed compatible with MinGW GCC?
The errors look like it might be MSVC based library install instead of MinGW GCC library.
What Compiler are you using?

Tim S.
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 15, 2010, 06:09:37 pm
Hiya,

I got the wrong library which you were right as it was MSVC Based library......
So I have install the MinGW GCCC Library and

now it is working fine.....thank you so much :)

Code block IDE With SDL is like a dream....unlike those Viusal express c++ which is like system hogs to me!
Title: Re: Using Code Block for First time?
Post by: Newbie C++ on October 15, 2010, 06:11:44 pm
how do I get rid of Console window as I have made the window with Images on it but there is console window behide it.... :?