1
\$\begingroup\$

I'm trying to set up sound in my Ogre3D project. I have installed irrKlang 1.4.0 and added it's include and lib directories to my projects VC++ Include and Library directories, but I'm still getting a Linker error when I attempt to build. Any suggestions?

(Error 4007 error LNK2019: unresolved external symbol "__declspec(dllimport) class irrklang::ISoundEngine * __cdecl irrklang::createIrrKlangDevice(enum irrklang::E_SOUND_OUTPUT_DRIVER,int,char const *,char const *)" (_imp?createIrrKlangDevice@irrklang@@YAPAVISoundEngine@1@W4E_SOUND_OUTPUT_DRIVER@1@HPBD1@Z) referenced in function "public: __thiscall SoundManager::SoundManager(void)" (??0SoundManager@@QAE@XZ)
\$\endgroup\$
1
  • \$\begingroup\$ Sounds like a question for StackOverflow. \$\endgroup\$
    – Sidar
    Commented Nov 11, 2012 at 3:32

1 Answer 1

0
\$\begingroup\$

Okay, after looking at this for awhile it seems I was making two mistakes:

  1. The lib directory for irrKlang is divided in two, so instead of adding (IRRKLANGDIRECTORY)\lib to my library directories, I should have been using (IRRKLANGDIRECTORY)\lib\Win32-visualStudio.

  2. Including the lib directory wasn't sufficient, I also needed to specify the use of the irrklang library file at the top of my class #pragma comment(lib, "irrklang.lib").

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .