Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi I have problem with running this on C++ under windows forms... I have linked libs and includes, My code (parts) include <irrKlang.h> pragma comment(lib, "irrKlang.lib") /// /// public ref class Form1 : public System::Windows::Forms::Form { ISoundEngine* engine; /// /// private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { engine = createIrrKlangDevice(); /// /// private: System::Void Function() { engine->play2D("sound.wav"); //////// I got 2 errors : Error 1 error LNK2001: unresolved external symbol "class irrklang::ISoundEngine * __clrcall irrklang::createIrrKlangDevice(enum irrklang::E_SOUND_OUTPUT_DRIVER,int,char const *,char const *)" (?createIrrKlangDevice@irrklang@@$$FYMPAVISoundEngine@1@W4E_SOUND_OUTPUT_DRIVER@1@HPBD1@Z) winSimulator.obj Error 2 fatal error LNK1120: 1 unresolved externals ..... What am i doing wrong ?? Thanks in Advance Flap |
||||
|
It's me again, I guess the .lib file is linked correctly , when it is not i get an Error 1 fatal error LNK1104: cannot open file 'irrKlang.lib' winSimulator |
||||
|
C'mon guys I really need it |
||||
|
Looks like you are simply not linking the lib file. Add the irrklang.lib file to link in the project settings, that probably helps. |
||||
|
So what i have done is 1)In Property -> Linker -> General -> Additional Library Directories I have browse in a hard drive and put absolute path as well as relative one. 2)In Property -> Linker -> Input > additional dependencies i put irrKlang.lib. Is there any other way i am not linking correctly ? Also i am getting 4 warnings of : Warning 1 warning C4272: 'irrklang::createIrrKlangDevice' : is marked __declspec(dllimport); must specify native calling convention when importing a function. I have modificated the path to *.h file |
||||
|
guys can anyone help me ? |
||||
|
i have the same problem like you had did you manage to resolve the problem? and if you did, could you tell me how? |
||||
|
It depends on your setup, entirely.You probably simply have forgotten to link to the irrklang.lib file in the linker settings of Visual Studio. Or you are using a .NET project with the non-.NET version of irrKlang. Or the other way round. See the posts above, they explain it. |
|