【发布时间】:2016-03-28 08:25:09
【问题描述】:
我正在尝试在 iPhone(模拟器)应用程序中使用 math.h 中的 sin()、cos()、tan()。
我需要更改哪些内容才能链接标准 C 数学库函数?
我正在从 .cpp 文件进行调用。
例如
#include <math.h>
..
float f = tan( p1 );
链接器输出:
"tan(float)", referenced from:
GetTan(float) in myfuncs.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我是否缺少所需的框架?
【问题讨论】:
标签: c++ ios iphone xcode linker