Author Topic: Help to compile ClanLib and other libs in Code::Blocks  (Read 6669 times)

Shauni

  • Guest
Help to compile ClanLib and other libs in Code::Blocks
« on: June 30, 2007, 02:02:32 pm »
Hello, I recenly bought the book "Introduction to Game Programming with C++" by Alan Thorn, and I have encountered a problem. In the beginning of Chapter 15 we're asked to download the latest main ClanLib library. And then it tells us to download "Dependencies" wich are "libjpeg" "zlib" and "libpng".

Then the book says Once the library is downloaded, all the required files should be extracted to a common folder. The first aim is to compile all the source code into a LIB (library) file...To do this, a programmer should open the source code files or project files in the IDE of his choice, and then build the project using standart compilation options.
(Here i face more questions, as 1) Wich source code files should be opened? There are a lot of them, and opening and compiling them all one by one sounds plain silly.) So basically I wonder how to compile ClanLib and the other libs mentioned above into library files. Feel free to explain in a very specific way as I'm fairly new to this program and don't know too much about it.

I'd really appreciate some kind of help, so that I may continue my voyage towards the gaming dream i so dearly desire to achieve.

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Help to compile ClanLib and other libs in Code::Blocks
« Reply #1 on: June 30, 2007, 08:46:17 pm »
I suggest you read the ClanLib docs, usually there is a section explaining how to build from source.

I am not sure what platform you are on - it may not be done in C::B, you should use whatever the ClanLib docs say to use it will be easier for. Usually it's from the terminal (at least on mac and linux, no idea about windows)

Shauni

  • Guest
Re: Help to compile ClanLib and other libs in Code::Blocks
« Reply #2 on: July 01, 2007, 07:52:46 pm »
I am using Windows XP Home Edition.

And the Code::Blocks manual only explains how to link a library file to a project, but not how to compile the library itself!

And where in the Code::Blocks folder is this terminal?

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Help to compile ClanLib and other libs in Code::Blocks
« Reply #3 on: July 01, 2007, 08:36:52 pm »
I am using Windows XP Home Edition.

And the Code::Blocks manual only explains how to link a library file to a project, but not how to compile the library itself!


well certainly the C::B manual cannot explain how to build every library in the world, since each one is unique. This is why you should look at the ClanLib manual rather than the C::B manual for this part. Once you have built ClanLib following their instructions, you can then use C::B to make ClanLib applications. Unless you have already prebuilt binaries?

You could always create a C::B project with the library wizard and add the ClanLib files to it, but if you don't know the internals of ClanLib code, i don't recommend doing that since you probably won't get the project right, it's likely the lib requires some defines, etc.

really, there is no universal standard way to build a lib and you should refer to the lib's instructions.

Quote
And where in the Code::Blocks folder is this terminal?

hmm... i mean the command-line prompt (the DOS thing) though since you're on windows i can't tell if this is going to be used since i don't use windows.