R
R
Remaust C++2020-08-07 12:46:59
C++ / C#
Remaust C++, 2020-08-07 12:46:59

The code with the audiere library is not going to. How to fix?

I work in Dev C++. At the beginning of the code I write

#include <iostream>
#include <locale>
#include <Windows.h>
#include <conio.h>
#include <audiere.h>
using namespace std;
using namespace audiere;


Then in int main()
AudioDevicePtr device  = OpenDevice();
OutputStreamPtr sound = OpenSound(device , "запись.m4a" , false); 
sound->play();


And when I try to run the code, it gives errors:
"C:\Users\НАЗВАНИЕ_ПРОФИЛЯ\AppData\Local\Temp\cc9TdK5u.o	Sounds.cpp:(.text$_ZN7audiere10OpenDeviceEPKcS1_[_ZN7audiere10OpenDeviceEPKcS1_]+0x1e): undefined reference to `__imp_AdrOpenDevice'"

"C:\Users\НАЗВАНИЕ_ПРОФИЛЯ\AppData\Local\Temp\cc9TdK5u.o	Sounds.cpp:(.text$_ZN7audiere16OpenSampleSourceEPKcNS_10FileFormatE[_ZN7audiere16OpenSampleSourceEPKcNS_10FileFormatE]+0x1b): undefined reference to `__imp_AdrOpenSampleSource'"

"C:\Users\НАЗВАНИЕ_ПРОФИЛЯ\AppData\Local\Temp\cc9TdK5u.o	Sounds.cpp:(.text$_ZN7audiere9OpenSoundERKNS_6RefPtrINS_11AudioDeviceEEERKNS0_INS_12SampleSourceEEEb[_ZN7audiere9OpenSoundERKNS_6RefPtrINS_11AudioDeviceEEERKNS0_INS_12SampleSourceEEEb]+0x40): undefined reference to `__imp_AdrOpenSound'"

Please tell me how to fix

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tsarevfs, 2020-08-07
@tsarevfs

audiere.lib must be included in the project settings. https://stackoverflow.com/a/12322024
Dev C++ is not a very popular development environment right now. For Windows, it will be much easier to find instructions and help for Visual Studio. Community version for it is free.
In addition, some libraries may not work at all, but this one should seem to start everywhere.

A
Alexander Ananiev, 2020-08-07
@SaNNy32

You need to add a link to the library that contains the implementation of __imp_AdrOpenDevice, __imp_AdrOpenSampleSource, __imp_AdrOpenSound

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question