Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I have the lines INCLUDEPATH += C:\\irrKlang-1.4.0\\include LIBS += -LC:\\irrKlang-1.4.0\\lib\\Win32-gcc -LlibirrKlang.a this seems to find the files ok. But when I compile make reports ./debug\LeeAudio.o:C:\SkyDrive\QT_Projects\LeesSpaceShip\LeesSpaceShip-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug/../LeesSpaceShip/Code/LeeAudio.cpp:22: undefined reference to `_imp___ZN8irrklang20createIrrKlangDeviceENS_21E_SOUND_OUTPUT_DRIVEREiPKcS2_' collect2: ld returned 1 exit status mingw32-make[1]: *** [debug\LeesSpaceShip.exe] Error 1 mingw32-make: *** [debug] Error 2 16:24:24: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2. |
||||
|
I'm using mingw 4.4 compiler. |
||||
|
gah, I got it, just needed to make LIBS += -LC:\\irrKlang-1.4.0\\lib\\Win32-gcc -lirrKlang |
||||
|
Hello, Sorry for posting on this topic, but I did exactly what you did and compiler is finding the libraries. My code compiles OK. However, when I write any line of code using the library, its crashing immediately. Here is the simple code I wrote : ISoundEngine* engine = createIrrKlangDevice(); if (!engine) { printf("Could not startup engine\n"); } engine->play2D("C:/irrKlang-1.4.0/media/getout.ogg", true); engine->drop(); // delete engine What is weird is that it crashes immediately and is not executing the code before the code written above. Does somebody have an idea? Thank you very much |
||||
|
Are you maybe using the latest MingW GCC compiler? This one has an incompatble ABI, there is a special build of irrKlang on the download page for it, you need to use that one. |
||||
|
Hello niko, Indeed I am using MingW GCC Compiler 4.7. I tried with your suggested files and I still have the same issue... :( Maybe I am doing something wrong but with no logs at all, not easy to guess from where it could come .... |
||||
|
Hello again, Looks like there is improvment : I added the lines : LIBS += -L$$PWD/C:/irrKlang-1.4.0/lib/Win32-gcc/irrKlang.a INCLUDEPATH += $$PWD/C:/irrKlang-1.4.0/lib/Win32-gcc INCLUDEPATH += $$PWD/C:/irrKlang-1.4.0/bin/Win32-gcc Now, it doesnt compile : D:\Profiles\rPortelli\Desktop\essai\essai\main.cpp:19: erreur : undefined reference to `_imp___ZN8irrklang20createIrrKlangDeviceENS_21E_SOUND_OUTPUT_DRIVEREiPKcS2_' I guess my .a library doesnt link with dll. Any idea how to do that on Qt Creator when pragma is not working? Thanks ! |
||||
|
Finally made it work correctly .... Directly included .a lib in .pro file : LIBS += "path/to/executable//libirrKlang.a" Thanks |
|