problem with Audiere

Discussion about everything. New games, 3d math, development tips...
Post Reply
Watcher
Posts: 40
Joined: Sat Jul 01, 2006 9:44 am
Location: Czech republic

problem with Audiere

Post by Watcher »

Hi I tried to use Audiere, but I have a strange problem while compiling.

This is my source code

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

#include "include/audiere.h"
using namespace audiere;


int main(int argc, char *argv[]){
     AudioDevicePtr auDevice(OpenDevice());

     

     //For music playing in the background
     OutputStream* music=OpenSound(auDevice, "effect.mp3", true);
     music->setVolume(0.7f); //70% Volume
     music->setRepeat(true);
     music->play();

system("PAUSE");
    return EXIT_SUCCESS;
}
and errors

Code: Select all

  [Linker error] undefined reference to `_imp__AdrOpenSound@12' 
  [Linker error] undefined reference to `_imp__AdrOpenSampleSource@8' 
  [Linker error] undefined reference to `_imp__AdrOpenDevice@8' 
  ld returned 1 exit status 
I use devcpp
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Try to link against audiere. Just using the includes is not enough. And dev-cpp does not support the lib-pragma.
Watcher
Posts: 40
Joined: Sat Jul 01, 2006 9:44 am
Location: Czech republic

Post by Watcher »

Thank you for advice. It works now.
Post Reply