Question about engine lib and dll
Question about engine lib and dll
Hello,
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?
You see, I'm a bit confused here
Thanks for your help
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?
You see, I'm a bit confused here
Thanks for your help
Hi!
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).
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).
Error 404
Well, is this a discription about config. my compiler in general? Or do you talk about the Irrlicht Visual Studio project file?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.
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.
So if anyone knows the secret here, please help
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.
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.
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?
Thanks a lot!
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?
Thanks a lot!
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.
#if (defined(_WIN32) || defined(_XBOX)) && \
(!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
#define _IRR_COMPILE_WITH_DIRECTX_8_
#define _IRR_COMPILE_WITH_DIRECTX_9_
#endif
#if (defined(_WIN32) || defined(_XBOX)) && \
(!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
#define _IRR_COMPILE_WITH_DIRECTX_8_
#define _IRR_COMPILE_WITH_DIRECTX_9_
#endif