Page 1 of 2

Compiling Irrlicht as static library

Posted: Mon Jun 27, 2011 2:01 am
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?

Posted: Mon Jun 27, 2011 2:28 am
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... ;)

Posted: Mon Jun 27, 2011 5:52 am
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?

Posted: Mon Jun 27, 2011 6:30 am
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.

Posted: Mon Jun 27, 2011 8:13 am
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.

Posted: Mon Jun 27, 2011 11:02 am
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 :)

Posted: Mon Jun 27, 2011 11:07 am
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.

Posted: Mon Jun 27, 2011 11:53 am
by [DEF]
Ah, just MinGW32. Latest version from MinGW-get as well. _mingw.h says the version number is 3.18.

Posted: Mon Jun 27, 2011 1:13 pm
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 !!!

Posted: Mon Jun 27, 2011 7:11 pm
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.

Posted: Wed Jun 29, 2011 12:14 am
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.

Posted: Wed Jun 29, 2011 12:45 am
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... ;)

Posted: Wed Jun 29, 2011 2:56 am
by Midnight
Acki wrote: you're realy trying to offend me !?!?! roflmao
I have better things to do, really, grow up.

Posted: Wed Jun 29, 2011 3:10 am
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?

Posted: Wed Jun 29, 2011 3:11 am
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.