问题描述
尝试在此页上创建以下是我所做的:
-
更改版本设置:
标题搜索路径:
-I / usr / local / include
图书馆搜索路径:
/ usr / local / lib
-
转到终端并输入
fltk-config --ldflags
你得到一行标志,我的是
-L / usr / local / Cellar / fltk / 1.3.2_1 / lib -lfltk -lpthread -framework Cocoa
。
在Xcode Build设置中,粘贴到
其他链接器标记
>
- 在这些步骤之后,Xcode成功编译文件。
Errors I get when trying to build the first block of code on this page under Xcode
I installed FLTK with homebrew by brew install FLTK
and there were no errors:
/usr/local/Cellar/fltk/1.3.2_1: 315 files, 5.8M, built in 93 seconds
I realize this problem has been asked before, but the answer
did not work for me or I got the specific file paths wrong. I have tried Xcode 5.1.1 and 6.0 and both have the same problem.
I have attached a screenshot of my build settings.
I have found the solution at groups.google.com and below is what I have done:
Change build settings as such:
Header Search Paths :
-I/usr/local/include
Library Search Paths :
/usr/local/lib
Go to terminal and type
fltk-config --ldflags
You get a line of flags, mine was
-L/usr/local/Cellar/fltk/1.3.2_1/lib -lfltk -lpthread -framework Cocoa
.In Xcode Build settings, paste that in
other linker flags
- After these steps Xcode compiled the file successfully.
这篇关于设置Xcode和FLTK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!