Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
I was attempting to compile the example program that comes with IrrKlang(irrklang.irrlicht3d.org) and every time it gives me a linker error: [Linker error] undefined reference to `_imp___ZN3irr5audio20createIrrKlangDeviceENS0_21E_SOUND_OUTPUT_DRIVEREbbPKc' The IrrKlang.lib file is being linked to in the Project Options/Parameters location, the headers directory was specified, the dll is in the right place, and I can't figure it out. Does anyone know why this would be happening? I'd appreciate some help. (btw, Dev-Cpp choked on the header files because some of them didn't have newlines at the bottom. Laz |
dartsman![]() Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
if the 'createIrrKlangDevice' is your first library call then its most likely that you didn't include the library file ![]() ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
That could be a problem then ![]() Lazarus |
dartsman![]() Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
yeah, well Irrlicht is cross platform, so there may also be multiple compiler builds of it. Hopefully Steve will have the answer, he is very knowledgable with Irrlicht. Just those specific linker errors are normally to do with not linking to the library, as it finds the declaration (function prototype) in the header files, so it compiles fine, but then when it goes to link the project (turn .obj files into the actual .exe), it cannot find the library to which your specifying, and so cannot find the body to that function call... Well at least thats my interpretation of it, please correct me if I'm wrong... ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
That was my understanding of it too, just didn't know why Dev-C++ wouldn't link with the Irrklang.lib file. I'll probably just have to download Microsoft C++ Express 2005, but on dialup... I've gotten to 1.7%, 1 day and 17 hours remaining. Laz |
steveth45![]() Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
Well, Dev-Cpp uses imported Gnu compilers and linkers. These create and link libraries with a totally different format than Microsoft's compiler. Using Google, I found this tool reimp that supposedly converts .lib files into something that MinGW (Dev-cpp's compiler) can use. I think it creates .a files that you can link to. ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Thanks Steve, I'll check it out. |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Weird. reimp converted it fine. but it still gives the same error ![]() |
dartsman![]() Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
did you include that library with your project? ------------------ |
Lazarus![]() Member Posts: 1668 From: USA Registered: 06-06-2006 |
Yes. Parameters section of project options, just like always. Meh, Dev-C++ never works right for me. Laz |