라이브러리를 추가하는데 오류가 생깁니다.
글쓴이: liush79 / 작성시간: 목, 2007/11/29 - 11:49오전
퀄컴사의 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
Forums:
GCC 버전
GCC 버전을 3.3으로 내려야 할 가능성이 높습니다.
버전을 3.4.6 으로 수정해 봤는데...
관심을 가져 주셔서 감사합니다. ^^;;
설치되어있던 버전이 3.4.6 이라 3.4.6으로 수정해 봤는데
이전과 비슷한 오류가 나타나네요..
꼭 3.3 으로 해야할까요?
아니면 다른문제 일까요 ?
빌드 명령
gcc test2.cpp -lqscl -lstdc++
3.3
3.4로 가는 것은 아무 의미도 없습니다. GCC 3.3까지는 libstdc++5를 사용하고, GCC 3.4부터는 libstdc++6을 사용하는데, 둘을 섞어서 사용하면 물어보신 것과 같은 에러가 납니다.
아 .. 그렇군요..
그럼 3.3을 설치해 봐야겠네요..
최신버전이 설치되어 있어도 문제 없이 설치되려나..
다시 구글신께 빌러 가보겠습니다.
3.3 버전을 설치해 보았습니다.
gcc 3.3 버전을 설치하고 컴파일 하니
오류 라인이 많이 줄었습니다.
하지만 아직 오류가 좀 더 남아있습니다. (그래도 뭔가 희망이 보이네요 ;;)
한번만 더 도와 주세요 ㅠㅠ
gcc g++ 모두 3.3으로 수정 했습니다.
빌드 명령
1. g++ test2.cpp -lqscl
2. g++ test2.cpp -lqscl -lpthread
오류메세지..
댓글 달기