I have a short question about compiling the engine. When I build it with Visual Studio, it creates a new dll. But what about the very small lib in the "./lib/VisualStudio" directory and for what is the file Irrlicht.exp? I mean, the sample projects link to the lib file, but the engine is a dll file?
When you compile the library yourself in Visual Studio, you have to tell the compiler what type of Library file you'd like. To me, it sounds like you are making it a "Dynamic Library" (.DLL)... you need to change that to a "Static Library" (.LIB)
If you're using .NET it's Project > Proj Properties > Config Properties > General > Proj Defaults > Config Type to set it.
The other (exp) i believe is for your debugger (but could be wrong).
Reverie wrote:When you compile the library yourself in Visual Studio, you have to tell the compiler what type of Library file you'd like. To me, it sounds like you are making it a "Dynamic Library" (.DLL)... you need to change that to a "Static Library" (.LIB)
If you're using .NET it's Project > Proj Properties > Config Properties > General > Proj Defaults > Config Type to set it.
Well, is this a discription about config. my compiler in general? Or do you talk about the Irrlicht Visual Studio project file?
I'm using the project file, that came with the source of Irrlicht, so I think the settings for the dll/lib are correct. I believe, it is correct that Visual Studio builds a dll. Even the sample projects use the lib ("#pragma comment(lib, "Irrlicht.lib")"), but they need also the DLL.
Is there no one with some experience in compiling the engine? It would be really helpfull, if someone may please explain this dll / lib thing, described above
The dll is needed during runtime. It is loaded by the application which uses Irrlicht (or whatever dll you need). Thus, any user of your application only needs the dll.
The developer of the application needs the additional lib file during linking with the library. It contains some informations on the functions provided by the library. That's the reason why you add the lib file to source code using some pragma instruction.
If you're using unix .so file sometimes you should remember that these contain both parts in one file, i.e. you use the shared library for linking and during runtime.
a question dude
ive seen this game build in irrlicht i think the title is treasure hunter where the main character is a penguin and on the games folder i dont see the engine dll in there. how is it posible?
So, when I write a new application that uses Irrlicht I must use the lib (#pragma comment(lib, "Irrlicht.lib")), but the user who runs the app just need the dll.
But one question for the linux compiler: in the example files, there is always an #pragma statement. As far as I know, these #pragma's are excklusive on the win32 plaform with Visual Studio.
But how does someone compile the examples under linux? Does the gcc/g++ compiler ignore the #pragma line in the code?
And one last point: when I compile the engine with Visual Studio, it is only 840 kb in size (release build) but the original dll file which comes with the examples is 1.348kb in size... can you explain why?
This may work in not compiling directx in but I'm not totally sure. In the sources to irrlicht there is a header file called IrrCompileConfig.h In that file Just comment out the following. And in theory it should not compile directx stuff. But again I've never delt with vs as I use devcpp but I'm guessing it should.