라이브러리를 추가하는데 오류가 생깁니다.

liush79의 이미지

퀄컴사의 Qcelp 코덱을 쓰려고 하는데 해당 라이브러리를 추가하면 오류가 발생합니다.
test2.cpp 를 빌드 하면 문제가 생깁니다.

윈도용 / 리눅스용 2가지 있는데
윈도우용은 오류없이 실행은 됩니다만(VC2005)

리눅스는 안되네요
무슨 라이브러리가 또 필요한 건지...
stl 라이브러리쪽에 문제가 잇는건지...

잘 모르겠네요 ㅠㅠ

빌드 명령 => g++ test2.cpp -I/usr/include -L/usr/lib -lqscl

test2.cpp 내용

#define QSCLGUID
#include <stdio.h>
#include <qscl.h>
 
/*
#include <string>
#include <iostream>
 
using namespace std;
*/
 
int main(int argc, char** argv[])
{
	IQsclCodec *poQCodec = reinterpret_cast<IQsclCodec *>(QsclCreateInstance(ID_QsclCodecQcelp, ID_IQsclCodec));
	poQCodec->configure(ID_RateVariable, 0);
 
	return 0;
}

오류 내용

/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw()':
qsclCodecMulaw.cpp:(.text+0x43): undefined reference to `Mutex::Mutex()'
qsclCodecMulaw.cpp:(.text+0x4b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
qsclCodecMulaw.cpp:(.text+0x5a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw()':
qsclCodecMulaw.cpp:(.text+0xac): undefined reference to `Mutex::Mutex()'
 
... 
 
중략
 
...
 
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libqscl.a(riff.o): In function `riffFindChunk(RiffFile&, char const*, unsigned long&, unsigned long&)':
riff.cpp:(.text+0x40d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
riff.cpp:(.text+0x420): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
riff.cpp:(.text+0x42a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../libqscl.a(riff.o): In function `riffSetChunk(RiffFile&, char const*, char const*, void const*, unsigned long, unsigned long, unsigned long)':
riff.cpp:(.text+0xa63): undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
collect2: ld returned 1 exit status

퀄컴 QCELP 코덱 받는 곳
받아서 테스트까지 해주실 분들을 위해.. -_-;;

http://www.cdmatech.com/platforms/valueplatform/purevoice_download.jsp

feanor의 이미지

GCC 버전을 3.3으로 내려야 할 가능성이 높습니다.

liush79의 이미지

관심을 가져 주셔서 감사합니다. ^^;;

설치되어있던 버전이 3.4.6 이라 3.4.6으로 수정해 봤는데
이전과 비슷한 오류가 나타나네요..

꼭 3.3 으로 해야할까요?

아니면 다른문제 일까요 ?

빌드 명령
gcc test2.cpp -lqscl -lstdc++

/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw()':
qsclCodecMulaw.cpp:(.text+0x43): undefined reference to `Mutex::Mutex()'
qsclCodecMulaw.cpp:(.text+0x4b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
qsclCodecMulaw.cpp:(.text+0x5a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw()':
qsclCodecMulaw.cpp:(.text+0xac): undefined reference to `Mutex::Mutex()'
qsclCodecMulaw.cpp:(.text+0xb4): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
qsclCodecMulaw.cpp:(.text+0xc3): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::~QsclCodecMulaw()':
qsclCodecMulaw.cpp:(.text+0x10c): undefined reference to `Mutex::freeMutex()'
 
...
 
중략
 
...
 
 
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(celp13k_quantize.o): In function `quantize_G':
celp13k_quantize.c:(.text+0xd6f): undefined reference to `log10'
celp13k_quantize.c:(.text+0xe06): undefined reference to `log10'
celp13k_quantize.c:(.text+0xe58): undefined reference to `log10'
celp13k_quantize.c:(.text+0xea2): undefined reference to `log10'
celp13k_quantize.c:(.text+0xefb): undefined reference to `log10'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(celp13k_quantize.o):celp13k_quantize.c:(.text+0xff7): more undefined references to `log10' follow
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libqscl.a(celp13k_cb.o): In function `compute_cb_gain':
celp13k_cb.c:(.text+0xb82): undefined reference to `pow'
collect2: ld returned 1 exit status

feanor의 이미지

3.4로 가는 것은 아무 의미도 없습니다. GCC 3.3까지는 libstdc++5를 사용하고, GCC 3.4부터는 libstdc++6을 사용하는데, 둘을 섞어서 사용하면 물어보신 것과 같은 에러가 납니다.

liush79의 이미지

그럼 3.3을 설치해 봐야겠네요..
최신버전이 설치되어 있어도 문제 없이 설치되려나..

다시 구글신께 빌러 가보겠습니다.

liush79의 이미지

gcc 3.3 버전을 설치하고 컴파일 하니
오류 라인이 많이 줄었습니다.
하지만 아직 오류가 좀 더 남아있습니다. (그래도 뭔가 희망이 보이네요 ;;)

한번만 더 도와 주세요 ㅠㅠ

gcc g++ 모두 3.3으로 수정 했습니다.

빌드 명령
1. g++ test2.cpp -lqscl
2. g++ test2.cpp -lqscl -lpthread

오류메세지..

/usr/lib/libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw[not-in-charge]()':
qsclCodecMulaw.cpp:(.text+0x43): undefined reference to `Mutex::Mutex[in-charge]()'
/usr/lib/libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::QsclCodecMulaw[in-charge]()':
qsclCodecMulaw.cpp:(.text+0xac): undefined reference to `Mutex::Mutex[in-charge]()'
/usr/lib/libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::~QsclCodecMulaw [not-in-charge]()':
qsclCodecMulaw.cpp:(.text+0x10c): undefined reference to `Mutex::freeMutex()'
/usr/lib/libqscl.a(qsclCodecMulaw.o): In function `QsclCodecMulaw::~QsclCodecMulaw [in-charge]()':
qsclCodecMulaw.cpp:(.text+0x163): undefined reference to `Mutex::freeMutex()'
 
.... 
 
중략
 
....
 
/usr/lib/libqscl.a(qsclFile.o): In function `QsclFile::release()':
qsclFile.cpp:(.text+0xac16): undefined reference to `MutexLock::lock()'
qsclFile.cpp:(.text+0xac3d): undefined reference to `MutexLock::unlock()'
qsclFile.cpp:(.text+0xac69): undefined reference to `MutexLock::unlock()'
/usr/lib/libqscl.a(qsclFile.o):(.gnu.linkonce.d._ZTV8QsclFile+0x128): undefined reference to `ThreadedObject::workerThreadLoopCondition()'
/usr/lib/libqscl.a(qsclFile.o):(.gnu.linkonce.d._ZTI8QsclFile+0x38): undefined reference to `typeinfo for ThreadedObject'

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.