Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
IrrKlang in C++ form.h @VS2005

flapjack
Registered User
Quote
2011-03-10 16:36:02

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


flapjack
Registered User
Quote
2011-03-10 16:53:28

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


flapjack
Guest
Quote
2011-03-14 16:31:36

C'mon guys I really need it


niko
Moderator
Quote
2011-03-14 16:52:10

Looks like you are simply not linking the lib file. Add the irrklang.lib file to link in the project settings, that probably helps.


flapjack
Guest
Quote
2011-03-16 14:47:52

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.	
....\othr\tests\soundddd\include\irrKlang.h 926

Warning 2 warning C4272: 'irrklang::createSoundDeviceList' : is marked __declspec(dllimport); must specify native calling convention when importing a function.
.....\othr\tests\soundddd\include\irrKlang.h 943

Warning 3 warning C4272: 'irrklang::createIrrKlangAudioRecorder' : is marked __declspec(dllimport); must specify native calling convention when importing a function.
....\othr\tests\soundddd\include\irrKlang.h 969

Warning 4 warning C4272: 'irrklang::createAudioRecorderDeviceList' : is marked __declspec(dllimport); must specify native calling convention when importing a function.

....\othr\tests\soundddd\include\irrKlang.h 984




I have modificated the path to *.h file


Flap
Guest
Quote
2011-03-21 10:02:13

guys can anyone help me ?


radu
Guest
Quote
2012-05-28 18:35:09

i have the same problem like you had
did you manage to resolve the problem? and if you did, could you tell me how?


niko
Moderator
Quote
2012-05-29 21:25:20

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.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact