"irrlicht.dll" excluded

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.
Post Reply
cpprules
Posts: 148
Joined: Wed Jul 27, 2005 8:37 pm
Location: on the Pedastal

"irrlicht.dll" excluded

Post by cpprules »

How to compile an app that can run without dll, I mean is there any way to merge dll into game or anything like that?
CRPG, FRPG, Oblivion Fan
Hater of Counter Strike (i hate it so much damn it)
Fred

Post by Fred »

Link your Windows application against the static library (irrlicht.lib?) and that should work. Otherwise just include ALL of the Irrlicht source files into your application project.
cpprules
Posts: 148
Joined: Wed Jul 27, 2005 8:37 pm
Location: on the Pedastal

Post by cpprules »

How do you mean? How should i do that in VC++ 7.1?
CRPG, FRPG, Oblivion Fan
Hater of Counter Strike (i hate it so much damn it)
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

Link your Windows application against the static library (irrlicht.lib?) and that should work. Otherwise just include ALL of the Irrlicht source files into your application project.
I really wonder hoy you were capable of compiling a program without inclugin that .lib file ;) This lib file does not contain the Irrlicht engine, it is just a "bridge" between your app and the dll, so you don't have to load the dll and get it's methods manually.

To get a real static Irrlicht.lib for your application, you must do the following:

Do a Find In Files in your project for "dllimport" and "dllexport". This way you will find where IRRLICHT_API is defined this way. Comment the "dllimport" and "dllexport" part, so IRRLICHT_API is defined as nothing (but it must STILL be defined). So, you should get something like this:

Code: Select all

#ifdef IRRLICHT_EXPORTS
#define IRRLICHT_API //__declspec(dllexport)
#else
#define IRRLICHT_API //__declspec(dllimport)
#endif // IRRLICHT_EXPORT
#else
#define IRRLICHT_API
Also, you must change the project settings, so it is a static library and not a dll.

Recompile IrrLicht.

And please make sure that you are including the modified "irrlicht.h" in your project, and not the original one, so IRRLICHT_API is not defined as dllimport nor dllexport.
Guest

Post by Guest »

Good info Jedive.. however what flags do you set to switch the irrlicht workspace/project (VC6) form dynamic dll to static lib?

I have tried /ML /_LIB etc and removed /_USRDLL but I can not force visualstudio to show me the "Library" box instead of the "Link" box in project settings. If I start a brand new static lib project I can see them but it seems a big job to re-import all of irrlichts source code and set it up.

How do you reccomend to do it? Is it something obvious and simple (never had to convert before but would like to in this case) - hopefully there is just some menu option somewhere - but I doubt it ;)

cheers
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

There is not menu option in VC6, and I don't have it installed to see what was needed to be changed. I use VC++ 2003 which has a simple list to change the type of project.
Post Reply