Code Blocks Help

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Code Blocks Help

Post by Alpha Omega »

How do you link two seperate source files in code blocks? The C++ book I am reading didn't cover Seperate Compilation very well and only told me how to link them via Unix command line. I have 2 source files and want to compile them together. Could anyone point me in the right direction? Thanks in advance :D .
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

C::B compiles all the files which are in your project.
In project - properties - build targets you can then set what sort of output file is created. Type "Console application" is typically used for irrlicht applications.

Usually you also have to add the libraries to link. You do that in project build options - linker settings - link libraries.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

if you want to create an Irrlicht application with codeblocks (and I guess you want to as you are posting in an Irrlicht forum) simply create a new project, the wizard gives you Irrlicht Projects as option and add the files you want to have compiled. I think Code::Blocks is pretty easy to use.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

In code blocks is fairly easy to make separated compilation, all you need to do is to add the source codes to the projects you create, and codeblocks will compile them separately, and will link them on its own.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply