Hi,
I have for a number of weeks been trying to integrate several third party librarys into a C++ application with no success, i'm sure the error is fairly simple, but i cannot for the life of me figure it out!
Libs:
- ccrtp
- jrtplib
- toast gsm
I always get 'undefined reference (...)' errors for any of the member functions i try to use. I'm using Fedora Core 3, g++ though the Eclipse IDE.
my compile line options would appear to be:
g++ -I/usr/local/include -O0 -g3 -Wall -c -fmessage-length=0 -lpthread -lthreads
I have followed all the install instructions for these libs including ./configure, make, make install, etc.
I'm not very experienced with linux so if anyone could shed any light on this it would be extremely helpful!
Thank you all!
-Dex
---------------------
Example code snippet: AudioCodec.cpp
I have for a number of weeks been trying to integrate several third party librarys into a C++ application with no success, i'm sure the error is fairly simple, but i cannot for the life of me figure it out!
Libs:
- ccrtp
- jrtplib
- toast gsm
I always get 'undefined reference (...)' errors for any of the member functions i try to use. I'm using Fedora Core 3, g++ though the Eclipse IDE.
my compile line options would appear to be:
g++ -I/usr/local/include -O0 -g3 -Wall -c -fmessage-length=0 -lpthread -lthreads
I have followed all the install instructions for these libs including ./configure, make, make install, etc.
I'm not very experienced with linux so if anyone could shed any light on this it would be extremely helpful!
Thank you all!
-Dex
---------------------
Example code snippet: AudioCodec.cpp
Code:
#include "AudioCodec.h"
#include <gsm/gsm.h>
/* Project includes */
#include "Global.h"
#include "SystemLogger.h"
gsm handle;
gsm_frame buf;
gsm_signal sample[160];
int cc, soundfd;
AudioCodec::AudioCodec()
{
systemLogger = &SystemLogger::getInstance();
}
AudioCodec::~AudioCodec()
{
}
int AudioCodec::decode()
{
return decode(0);
}
int AudioCodec::decode( int codec )
{
switch (codec)
{
case 0:
// gsm decode
if (!(handle = gsm_create()))
*ERROR: undefined reference to `gsm_create()' AudioCodec.cpp server line 34 05 January 2005 14:51:58
{
printf("Error: Unable to create GSM decoder");
return 0;
}
if (gsm_decode(handle, buf, sample) < 0) return 0;
*ERROR: undefined reference to `gsm_decode(gsm_state*, unsigned char*, short*)' AudioCodec.cpp server line 40 05 January 2005 14:51:58
gsm_destroy(handle);
ERROR: undefined reference to `gsm_destroy(gsm_state*)' AudioCodec.cpp server line 42 05 January 2005 14:51:58
break;
default:
systemLogger->addToSystemLog("AudioCodec::No codec selected");
printf("Error: No codec selected");
}
return 0;
}