libFLAC符号没有发现虚函数表的错误 [英] libFLAC symbols not found and vtable errors
问题描述
我已经从源代码code下的Macintosh OS X 10.6.8编译libFLAC和测试WAV后手转换成功(在命令行)。我也用默认的构建这样:的./configure - preFIX =$基地/ FLAC /多/--exec- preFIX =$基地/ FLAC /主/--disable -asm的优化和放大器;&安培;让&功放;&安培;使安装
I have compiled libFLAC from source code under macintosh os x 10.6.8 and tested WAV to FLAC conversion with success (from the command line). I have also used the default build as such: ./configure --prefix="$base/flac/more/" --exec-prefix="$base/flac/main/" --disable-asm-optimizations && make && make install
现在增加了对FLAC头文件的路径和库到一个全新的项目之后。我试图去code和使用libFLAC FLAC音频加载到系统内存,例如code这是与libFLAC捆绑之下。但是我得到符号没有发现与标准C
错误和与C ++标准的做法没有发现虚函数表符号
错误(如如下图所示)。
Now after adding the paths for FLAC headers and the libs into a brand new project. I am attempting to decode and load FLAC audio into system memory using libFLAC, under the example code which was bundled with libFLAC. However i am getting symbols not found
errors with Standard C and vtable symbols not found
errors with the Standard C++ approach (as seen below).
的C方式下的错误:
的 FLAC 的_stream_de coder_get_state,从引用的:
"FLAC_stream_decoder_get_state", referenced from:
_main in main.o
的 FLAC 的_stream_de coder_new,从引用的:
"FLAC_stream_decoder_new", referenced from:
_main in main.o
的 FLAC 的_StreamDe coderStateString,从引用的:
"FLAC_StreamDecoderStateString", referenced from:
_main in main.o
的 FLAC 的_StreamDe coderErrorStatusString,从引用的:
"FLAC_StreamDecoderErrorStatusString", referenced from:
error_callback(FLAC__StreamDecoder const*,
FLAC__StreamDe coderErrorStatus,无效*)在main.o中
FLAC__StreamDecoderErrorStatus, void*)in main.o
的 FLAC 的_stream_de coder_init_file,从引用的:
"FLAC_stream_decoder_init_file", referenced from:
_main in main.o
的 FLAC 的_StreamDe coderInitStatusString,从引用的:
"FLAC_StreamDecoderInitStatusString", referenced from:
_main in main.o
的 FLAC 的_stream_de coder_set_md5_checking,从引用的:
"FLAC_stream_decoder_set_md5_checking", referenced from:
_main in main.o
的 FLAC 的_stream_de coder_process_until_end_of_stream,从引用的:
"FLAC_stream_decoder_process_until_end_of_stream", referenced from:
_main in main.o
的 FLAC 的_stream_de coder_delete,从引用的:
"FLAC_stream_decoder_delete", referenced from:
_main in main.o
LD:符号(S)未找到
ld: symbol(s) not found
collect2:LD返回1退出状态
collect2: ld returned 1 exit status
从我所了解的是两种:连接器是没有看到库(因为它是看到标题)或libFLAC未正确编译。我应该心存感激,如果有人将指向我给了这些错误可能的解决方案。
From what i can understand is either: the linker is not seeing the libs (because it is seeing the headers) or the libFLAC was not compiled correctly. I'll be thankful if anyone will point me to possible solutions given these errors.
推荐答案
我在做连接不正确。链接需要按照这个计算器后添加静态库X code C ++项目
中完成(<一个href=\"http://stackoverflow.com/questions/15973472/adding-static-library-inside-x$c$c-c-project\">Adding X code C ++项目),但我加入下的链接目录内的静态库项目设置
我在那里加入我的头路,因此,它是不工作。
I was doing the linking incorrectly. Linking needs to be done according to this stackoverflow post Adding static library inside Xcode C++ project
(Adding static library inside Xcode C++ project) but i was adding the linking directory under the Project Setting
where i was adding my headers path, thus it was not working.
这篇关于libFLAC符号没有发现虚函数表的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!