Compiling Irrlicht as static library

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
[DEF]
Posts: 17
Joined: Thu Jul 29, 2010 8:30 am

Compiling Irrlicht as static library

Post by [DEF] »

Hi guys, I have the 1.7.2 source and want to compile Irrlicht as a static library. I'm using the latest GCC compiler with Code::Blocks, but when it gets to CFileSystem.cpp, it tells me it can't find _MAX_PATH, or _fullpath. I checked these in the stdlib.h, and they're there. I can't figure out why the compiler won't find them. Any ideas?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

try my IrrExtensions... 8)
you can disable the extensions if you don't want them, but you can easily compile Irrlicht with any configuration, also as static lib...
for the usage have a look at the tutorials section, too... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
[DEF]
Posts: 17
Joined: Thu Jul 29, 2010 8:30 am

Post by [DEF] »

Acki wrote:try my IrrExtensions... 8)
you can disable the extensions if you don't want them, but you can easily compile Irrlicht with any configuration, also as static lib...
for the usage have a look at the tutorials section, too... ;)
It won't let me specify my Code::Blocks directory for the compiler.. Since I don't have Code::Blocks in my registry / start menu etc (I run it from a USB drive). Is there any way I can set the directory? Or do I have to do another install of Code::Blocks, so IrrExt can 'see' it?
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Pretty sure acki's irrExtensions isn't liberal licensed for commercial use.. and as such I consider it junk. acki can confirm or deny that one, leave me out of it.

Anyway here is my suggestion.

_IRR_STATIC_LIB_ add that to your configuration, and set the general (or whatever) settings to static lib rather then dll. pretty sure that's all you need.

as for your directory you should be able to set that in your operating systems environment settings if I'm not mistaken, I'd explain how had I know what OS you're running.

Hope that works, I'll try to check up on this thread later.

EDIT: just noticed you mentioned start menu so-> environment settings are siimply right-click my computer and select properties, you'll find it.. if you don't know how to do it just google it or something, not very hard.

it's probably just easier to install it. I recommend msvc express 2010, I had issues with codeblocks and gcc personaly and since I'm not worried about crossplateform compatibility it's no biggy for me.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Add _IRR_STATIC_LIB_ to both - your application and the library.
If that doesn't work, please tell also which Irrlicht version you are using and which OS.
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
[DEF]
Posts: 17
Joined: Thu Jul 29, 2010 8:30 am

Post by [DEF] »

I'm just compiling the Irrlicht 1.7.2 source, on Windows 7. Just using the .cbp that comes with the source, which should work right? Looking into it, I think it may be the c++0x standard messing with stuff.. I'll dig some more into it tomorrow, but I think that's it, and maybe defining __STRICT_ANSI__ may help. Not sure yet though. But thanks for the help guys :)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

With MinGW32 or MinGW64? (I must admit I didn't test the latter so far, even though I have W7 on 64-bit running, but still using MinGW32 on it). Also it's probably a while since I last tested static-compile in c::b.
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
[DEF]
Posts: 17
Joined: Thu Jul 29, 2010 8:30 am

Post by [DEF] »

Ah, just MinGW32. Latest version from MinGW-get as well. _mingw.h says the version number is 3.18.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

[DEF] wrote:
Acki wrote:try my IrrExtensions... 8)
you can disable the extensions if you don't want them, but you can easily compile Irrlicht with any configuration, also as static lib...
for the usage have a look at the tutorials section, too... ;)
It won't let me specify my Code::Blocks directory for the compiler.. Since I don't have Code::Blocks in my registry / start menu etc (I run it from a USB drive). Is there any way I can set the directory? Or do I have to do another install of Code::Blocks, so IrrExt can 'see' it?
you don't need this realy, you can create the extensions then leave IrrExtensions and open the project file in the source directory, so you can compile inside your IDE... ;)

EDIT:
Midnight wrote:Pretty sure acki's irrExtensions isn't liberal licensed for commercial use.. and as such I consider it junk. acki can confirm or deny that one, leave me out of it.
don't make statements like this without reading the license first !!! :roll:
take your time and read the license or be quiet !!!
Last edited by Acki on Mon Jun 27, 2011 8:02 pm, edited 1 time in total.
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Could be the bug that was patched here: http://irrlicht.svn.sourceforge.net/vie ... 93&r2=3297

So you can either add the missing include for <tchar.h> or install the svn version for Irrlicht. If you compile Irrlicht yourself anyway I would recommend doing the latter as svn also contains several more bugfixes already.
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
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

big girls don't cry Acki. lol

What part of LEAVE ME OUT OF IT didn't you read?

I could give two shits about your license Acki it's still garbage. Stop using the help threads to promote your junk you conceited weirdo.

you would think by now people would have learned not to tell me to be quiet. I am not your bitch.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Midnight wrote:big girls don't cry Acki. lol

What part of LEAVE ME OUT OF IT didn't you read?

I could give two shits about your license Acki it's still garbage. Stop using the help threads to promote your junk you conceited weirdo.

you would think by now people would have learned not to tell me to be quiet. I am not your bitch.
you're realy trying to offend me !?!?! roflmao
there was others trying harder tho !!! :lol:
and to be a big girl is better than being a little wimp that doesn't stand to his words !!! :roll:
and btw, even when I don't tell about IrrExtensions in a thread I still promote it (maybe you didn't see my signature)... 8)

just for clarification to the other ppl:
I wrote IrrExtensions for my own use...
but because many users had/have problems recompiling the engine and/or want some of the extensions I decided to make it public...
but this you can also read in the FAQs... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Acki wrote: you're realy trying to offend me !?!?! roflmao
I have better things to do, really, grow up.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

Midnight wrote:I have better things to do, really
Apparently not...
Midnight wrote:grow up.
Something you always dreamed about but didn't achieve yet?
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Sylence wrote:
Midnight wrote:I have better things to do, really
Apparently not...
Midnight wrote:grow up.
Something you always dreamed about but didn't achieve yet?
Whatever you say kid.
Locked