≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Crash when trying to play (gcc 4.8.1, win32)
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b]xorus[/b] wrote: Hello, I am trying to use the irrKlang library but it crashes everytime it starts. Here is my code : [code] include <iostream> include <irrKlang.h> pragma comment(lib, "irrKlang.lib") // link with irrKlang.dll using namespace std; //... void Test() { std::cout << "Test() start" << std::endl; irrklang::ISoundEngine* engine = irrklang::createIrrKlangDevice(); if (!engine) cout << "it will fail" << endl; cout << "Engine memory adress : " << &engine << endl; engine->play2D("test.ogg", true); cout << "Sound playing" << endl; cin.get(); engine->drop(); // delete engine cout << "The end" << endl; } [/code] The function is called from the main. I get on the output : [code]Test() start irrKlang sound library version 1.4.0 Loaded plugin: ikpmp3.dll Using DirectSound8 driver Engine memory adress : 0x28fed8 [/code] And then the program crashed. I compile using the command : [code]g++ --std=c++11 -o projet.exe main.cxx audio.cxx -lirrKlang[/code] What am I doing wrong ? Windows VS13 debugger (I don't use it to code) says : "Unhandled exception 0x61962056 (irrKlang.dll) in projet.exe : 0xC0000005: Access Violation when reading location 0x00000001" ("Exception non gérée à 0x61962056 (irrKlang.dll) dans projet.exe : 0xC0000005 : Violation d'accès lors de la lecture de l'emplacement 0x00000001.") Thanks for helping, xorus.[/quote]
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