Recently, I have downloaded the Irrklang sound library to use with my C++ programs. To test it out, I have Installed and linked the library in Code::Block's compiler settings and in my projects build settings. However, whenever I try to build & run the following code:
#include <irrKlang.h>
using namespace std;
using namespace irrklang;
int main(){
ISoundEngine* engine = createIrrKlangDevice();
}
The "Build Messages" tab throws the following error:
|Line 5|undefined reference to`_imp___ZN8irrklang20createIrrKlangDeviceENS_21E_SOUND_OUTPUT_DRIVEREiPKcS2_'|
And here's the error from the "Build Log" tab:
64bit-1.5.0\lib\Winx64-visualStudio\irrKlang.lib"
obj\Debug\main.o: In function `main':
C:/Users/Johnny/Desktop/Python/Learner/main.cpp:5: undefined reference to _imp___ZN8irrklang20createIrrKlangDeviceENS_21E_SOUND_OUTPUT_DRIVEREiPKcS2_'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I have to tell you, this is my first time downloading and using a library with C++. I used this tutorial: http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-codeblocks/
I've looked up this error on google, and while people with the same problem come up, all of the solutions they got are either too vague or their error report was caused by a different error.
Here's some pages I looked through:
http://www.ambiera.com/forum.php?t=939
I looked through more than just this one, mostly on the same forum, but I can only post a maximum of two links, and I decided that it was more important that you could tell how I linked the library.