我正在尝试为 mac os x 编译一个 jni 库。如果这很重要,我的系统正在运行 Mountain Lion。我在 xcode 中创建了一个 jni 项目并将源文件复制到项目中。它编译得很好,但有链接错误。这是错误:
Undefined symbols for architecture x86_64:
"_init_queue", referenced from:
_floodfill in floodfill.o
"_jumpPointSearch", referenced from:
_Java_com_clashtune_pathfind_Pathfinder_jumpPointSearchNative in main.o
(maybe you meant: _Java_com_clashtune_pathfind_Pathfinder_jumpPointSearchNative)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我做错了什么?它有四个源文件main.c
,floodfill.c
和. 我不明白他们在做什么,因为我不是 C 程序员。我只是在这个论坛上为朋友编译它们。jumppointsearch.c
queue.c
编辑:
这是该项目的项目属性页面“构建阶段”。
谢谢。