Hello all,
I've decided to use the Irrlicht Engine for my indie game and have just started today.
However, while following the first tutorial, I ran into some linker issues. It can't find irrlicht.dll to run the application. It compiles completely and no errors or warnings.
I have linked to irrlicht.lib and irrlicht.h in Visual C++ 2010 Express.
For Library Dirrectories I have set it to C:\SDK's\irrlicht\1.7.2\irrlicht-1.7.2\lib\Win32-visualstudio (where irrlicht.lib is contained) and for Include Directories I have C:\SDK's\irrlicht\1.7.2\irrlicht-1.7.2\include (where irrlicht.h is and all of the other header files).
I hope I've been clear enough so inform me if I haven't in your opinion.
Thanks,
7 replies to this topic
#1
Posted 29 May 2011 - 11:35 PM
|
|
|
#2
Posted 30 May 2011 - 02:41 AM
I believe Microsoft uses .lib for static linking, not dynamic linking and your project probably is set to link dynamically. If you set that up correctly, for static linking it is said to place this before your inclusion of irrlicht.h:
#define _IRR_STATIC_LIB_
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 30 May 2011 - 02:49 AM
I tried that, it still can't find it. Have I done it correctly?
#define _IRR_STATIC_LIB_ #include <irrlicht.h> //#include <d3d9.h> //Namespace for Irrlicht Engine. using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; //Kill console window upon startup. #ifdef _IRR_WINDOWS_ #pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "d3d9.lib") #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") #endif
#4
Posted 30 May 2011 - 03:15 AM
Ah, it claims that it required the DLL anyway, I am not so familiar with MSVC so I am not sure why it will not just compile statically.
You may have to follow the instructions to get the DLL, and place it in the current working directory or system32.
You may have to follow the instructions to get the DLL, and place it in the current working directory or system32.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 30 May 2011 - 11:34 AM
It compiles and runs! Thank you for pointing that out. I just moved Irrlicht.dll into system32 directory.
#6
Posted 30 May 2011 - 11:46 AM
When redistributing your game you'll have to provide that dll for end user, keep that in mind.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#7
Posted 30 May 2011 - 11:50 AM
Yes I realised that. But where would I put it on their computer? In the same place?
#8
Posted 30 May 2011 - 12:05 PM
Hunter100 said:
Yes I realised that. But where would I put it on their computer? In the same place?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









