Newbie question!
Hello, I'm using irrlicht from within a dll, but it complains about not finding the dll unless it's in the Windows System directory.
Is there any way of being able to put the two dll's together, as I just don't want to install stuff into people's Windows folder?
Or failing that, can I just compile Irrlicht straight into my dll without having two files?
Thanks,
Dave
Calling FROM a dll [solved]
Calling FROM a dll [solved]
Last edited by zotlerg on Thu Feb 12, 2009 7:10 pm, edited 1 time in total.
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
i guess you mean static linking, but that should be fine.
The other thing is apps look for required dll's in 2 places :
The calling directory
The path , this includes windows directorys
I dont know why the same folder wouldnt find it, but you could always try adding your folder to the path if you are desperate
The other thing is apps look for required dll's in 2 places :
The calling directory
The path , this includes windows directorys
I dont know why the same folder wouldnt find it, but you could always try adding your folder to the path if you are desperate
Thanks FuzzYspo0N, of course, the windows path. I got it all working in just a few lines of code - brilliant!
But I want to do a static link anyway, so I've loaded the Irrlicht project file into my VC9 Solution.
I selected the already made "Static lib - Release" - greatfully included with the project, and it compiles fine. And I've set this as a dependancy to my dll in the solution that worked for dynamic library.
But I'm having trouble compiling, with the following link error:-
I have to admit I hate these kinds of errors as they just don't seem to tell me anything!
I'm using irrlivth 1.5 and the library builds OK and starts with:-
Thanks,
Dave H
But I want to do a static link anyway, so I've loaded the Irrlicht project file into my VC9 Solution.
I selected the already made "Static lib - Release" - greatfully included with the project, and it compiles fine. And I've set this as a dependancy to my dll in the solution that worked for dynamic library.
But I'm having trouble compiling, with the following link error:-
The EffectEditor function is my code, and the first reference to Irrlicht. I'm sure that both are using "__cdecl (/Gd)" as the calling convention.error LNK2019: unresolved external symbol "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDeviceEx(struct irr::SIrrlichtCreationParameters const &)" (__imp_?createDeviceEx@irr@@YAPAVIrrlichtDevice@1@ABUSIrrlichtCreationParameters@1@@Z) referenced in function "public: virtual bool __thiscall EffectEditor::open(void *)" (?open@EffectEditor@@UAE_NPAX@Z)
I have to admit I hate these kinds of errors as they just don't seem to tell me anything!
I'm using irrlivth 1.5 and the library builds OK and starts with:-
Can anyone help?>------ Build started: Project: Irrlicht, Configuration: Static lib - Release Win32 ------
Thanks,
Dave H
O.K. I found in IrrCompileConfig.h this:-
// To build Irrlicht as a static library, you must define _IRR_STATIC_LIB_ in both the
// Irrlicht build, *and* in the user application, before #including
And that worked, although I had to rename Irrlicht's DllMain to something else as it conflicted with my own dll which can't be renamed for compatibility down the line.
Please give it a more specific name like "DllMainIrrlicht" or something!
Thanks!
// To build Irrlicht as a static library, you must define _IRR_STATIC_LIB_ in both the
// Irrlicht build, *and* in the user application, before #including
And that worked, although I had to rename Irrlicht's DllMain to something else as it conflicted with my own dll which can't be renamed for compatibility down the line.
Please give it a more specific name like "DllMainIrrlicht" or something!
Thanks!
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact: