【发布时间】:2017-06-06 10:29:35
【问题描述】:
为什么构建静态库 (.a) 不会出现任何错误并且可以正常工作:
$(LIBRARY): assertion.o
$(AR) $(OUTPUT_STATIC_LIB_DIR)/$(LIBRARY) $(OUTPUT_DIR)/assertion.o
同时,在构建共享库(.so)时出现这样的错误:
$(SHARED_LIBRARY): assertion.o
$(CC) $(CFLAGS) -shared -o $(OUTPUT_LIB_DIR)/$(SHARED_LIBRARY) $(OUTPUT_DIR)/assertion.o
错误信息:
Undefined symbols for architecture x86_64:
"_float_cmp_func", referenced from:
【问题讨论】:
标签: c gcc shared-libraries dynamic-library