Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
External error issue.

themohwakninja
Registered User
Quote
2015-06-03 06:29:12

Hello,

I am trying to use irrKlang in VS2010 for C++/CLI, and the line:
static ISoundEngine* engine = createIrrKlangDevice();

throws the errors:

error LNK2028: unresolved token (0A000012) "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) referenced in function "?.cctor@Form1@SuperMetroidCraft@@$$FSMXXZ" (?.cctor@Form1@SuperMetroidCraft@@$$FSMXXZ)
error LNK2019: 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) referenced in function "?.cctor@Form1@SuperMetroidCraft@@$$FSMXXZ" (?.cctor@Form1@SuperMetroidCraft@@$$FSMXXZ)


- The "Additional Include Directories" points to the IrrKlang Include folder
- The "Addition Library Directories" points to the IrrKlang lib/Winx64-visualStudio folder
- The "Additional Dependencies" points to the IrrKlang lib/Winx64-visualStudio/irrKlang.lib file

The very first four lines of my program are (the first three lines do have hashtags at the beginning... I don't know why they aren't showing up here):

pragma comment(lib, "irrKlang.lib")
include "stdafx.h"
include <irrKlang.h>
using namespace irrklang;



niko
Moderator
Quote
2015-06-03 09:00:16

are you maybe compiling your game as 32 bit? It seems you are using the 64 bit version of irrKlang instead. If so, download the 32 bit version of irrklang and link to that one instead.


niko
Moderator
Quote
2015-06-03 09:01:23

Wait, you say you are using C++/CLI, so your software is managed? You can use irrKlang.NET for this then. Just add the irrKlang.NET.dll as reference to your project and use the irrklang .NET API instead.


themohwakninja
Registered User
Quote
2015-06-03 18:21:18

Ah,

The program runs now, thanks!

One last little question though: If I were to release my program to the public, would I need to include any of the irrKlang files with my program?


erik
Registered User
Quote
2015-06-04 05:31:11

Only the irrklang.DLL or irrKlang.NET.dll.

If you are using the non-managed C++ version, it is also possible to link irrklang statically, then you don't even need the irrklang.dll. But this requires a commercial license.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (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