2011-03-07 2 views
0

내 MFC 애플리케이션의 경우 어레이의 .wav 데이터를 ogg vorbis 형식으로 변환해야합니다.내 프로젝트에 ogg vorbis 인코딩 추가하기

정적 라이브러리로 libogg와 libvorbis를 모두 컴파일했습니다. 내 프로젝트 폴더에 "bin"디렉토리를 만들고 libvorbis_static.lib 및 libvorbisfile_static.lib을 배치했습니다. 또한 bin 디렉토리 libvorbis 폴더와 include 폴더를 만들고 vorbis (codec.h, vorbisfile.h, vorbisenc.h) 및 ogg (os_types.h 및 ogg.h 포함) 폴더를 배치했습니다. libvorbis_static.lib를 내 프로젝트의 추가 종속성과 bin 폴더를 추가 라이브러리 디렉토리에 추가했습니다. 내가 컴파일하려고하면

, 나는 오류를 얻을 :

1>libvorbis_static.lib(info.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 

1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _free already defined in libcmtd.lib(dbgfree.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _calloc already defined in libcmtd.lib(dbgcalloc.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _malloc already defined in libcmtd.lib(dbgmalloc.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _realloc already defined in libcmtd.lib(dbgrealloc.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _memmove already defined in libcmtd.lib(memmove.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _ldexp already defined in libcmtd.lib(_ldexp_.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _qsort already defined in libcmtd.lib(qsort.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _ceil already defined in libcmtd.lib(_ceil_pentium4_.obj) 

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _exit already defined in libcmtd.lib(crt0dat.obj) 

1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in libcmtd.lib(typinfo.obj) 

1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in libcmtd.lib(typinfo.obj) 

1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_stream_clear 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_page_eos 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_stream_pageout 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_stream_flush 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_stream_packetin 

1>BookDoc.obj : error LNK2001: unresolved external symbol _ogg_stream_init 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_readinit 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_bytes 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_writeclear 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_read 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_reset 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_write 

1>libvorbis_static.lib(info.obj) : error LNK2001: unresolved external symbol _oggpack_writeinit 

1>libvorbis_static.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_writetrunc 

1>libvorbis_static.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_get_buffer 

1>libvorbis_static.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_adv 

1>libvorbis_static.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_look 

1>.\Debug/Book.exe : fatal error LNK1120: 17 unresolved externals 

내가 혼란 스러워요. 도와 주실 수 있겠습니까? 감사합니다. .

+0

이전 질문과 다른 점은 무엇입니까? http://stackoverflow.com/questions/5186558/problem-encoding-wav-into-ogg-vorbis? –

답변

0

LINK : 경고 LNK4098 : defaultlib 다른 libs와의 사용과 'MSVCRT'충돌; 사용/NODEFAULTLIB : - 단지 컴파일러를 알려줍니다 무엇

그것은 ORBIS와는 아무 상관 없습니다 라이브러리, 이것은 당신이 시도하고 링크 모두 C의 다음 stdlib와 같은 프로그램에서 MFC의 C의 다음 stdlib 때 당신은 무엇을 얻을 . 또는 libcmt/d를 무시하도록 설정하십시오.

0

ogg-vorbis를 컴파일 한 c-runtime을 확인하십시오. 정적으로 연결하는 경우 앱과 일치해야합니다.

vorbis를 DLL로 컴파일 한 경우 별도의 c-runtimes를 사용할 수 있습니다 (vorbis DLL에 의해 할당 된 메모리가 항상 해당 DLL에 의해 해제되고 c-only API 인 경우).

관련 문제