Given the following files
RsbbDec.exe
Run_RsbbDec.exe
TRSCompress.dll
TRSCompress.lib
and the following example code:
#include <iostream>
#pragma comment(lib, "TRSCompress.lib.")
extern "C" __declspec(dllexport) int Run_RsbbDec(const char* Input_File, int vbr_en, int bitrate , char *ErrMsg);
#define TEXTLEN 1024
int main()
{
char ErrMsg[TEXTLEN];
if(Run_RsbbDec("audio.pcm", 1, 1, ErrMsg))
{
std::cout <<"ok";
}
else
{
std::cout <<"error";
}
}
How do I make the sample code work? The only instruction I was given was to make sure that the .dll and the 2 exes are in the same directory.
It seems to me that the main point of the demo code is to run the Run_RsbbDec function which I think is located in one of the executables.
I get a linker error when I run the code:
/tmp/ccuvBnWV.o:main.cpp:(.text+0x2b): undefined reference to `Run_RsbbDec'
I am using this command to compile:
g++ main.c RsbbDec.exe Run_RsbbDec.exe