Page 1 of 1

problem finding lib file

Posted: Sat May 10, 2008 3:48 pm
by instinct
As i was trying out the very first tutorial it said i had to add the Irrlicht.lib file to the already existing libary list in visual studio. But after i had compiled(was OK) and built my project it returned an error saying the .lib file couldnt be found. I selected the 'irrlicht-1.4\lib\Win32-visualstudio' directorty. When i browse this map i do see the Irrlicht.lib file, but for some reason visual studio cant find it. It didn't say anything about the header file i added earlier, so i think this is kind of strange, i assume Visual has found it?.....Does anyone know what im doing wrong?

Posted: Sat May 10, 2008 4:02 pm
by Oddmonger
I usually use gcc, but if i remember well, you just have to include library on the cl command line.

Libraries which are not found don't return an error at the compilation stage. It's when linking than you get an error, if the library is not found by the linker.

Check these 2 things:
- Is "Irrlicht.lib" specified for linking ?
- Are you sure that "Irrlicht.lib" is in the path ?

Posted: Sat May 10, 2008 4:12 pm
by MasterGod
In VC use:
#pragma comment(lib, "Irrlicht.lib")

and make sure your IDE knows where to look for this lib file.

Posted: Sat May 10, 2008 4:26 pm
by instinct
although i havent changed anything it works for some reason, but now VS cant find the irrlicht.dll file.....what do i have to do in order for VS to find it?

Posted: Sat May 10, 2008 5:47 pm
by twilight17
you have to copy Irrlicht.dll from your BIN folder where you installed irrlicht to where you have your debug and release .EXEs.


(That was a long sentence :mrgreen:)

Posted: Sat May 10, 2008 6:27 pm
by instinct
twilight17 wrote:you have to copy Irrlicht.dll from your BIN folder where you installed irrlicht to where you have your debug and release .EXEs.


(That was a long sentence :mrgreen:)
allright it works now! thx a lot!

Posted: Sun May 11, 2008 12:25 am
by twilight17
No problem :lol: