I installed msgpack with brew and can compile the sample code with gcc msgpacktest.c -lmsgpack
in the command line. But when I add the header in test.m
, a class in my iOS project and add -lmsgpack
in Compile Sources of Build Phases, I still get the error msgpack.h file not found
. I am a new programmer and this is confusing me. What am I missing?
Asked
Active
Viewed 692 times
0

user299648
- 2,769
- 6
- 34
- 43
-
are you building it for iPhone simulator or iOS device? – SRI Nov 20 '13 at 18:58
-
I am using the iPhone simulator. – user299648 Nov 20 '13 at 19:16
-
try to build it for iOS device dude . Because some framework doesn't link for iPhone simulator – SRI Nov 21 '13 at 04:50
1 Answers
0
You need to tell Xcode where to find the header. In Build Settings, under Search Paths, add the path under User Header Search Paths.

RishiG
- 2,790
- 1
- 14
- 27
-
I now add /usr/local/Cellar/msgpack/0.5.7 to my Header Search Paths, but I am still getting the same error. – user299648 Nov 20 '13 at 19:05
-
Did you add it under Header Search Paths, or User Header Search Paths? Try setting Always Search User Paths to YES. Also, sometimes things don't take effect until you quit and restart Xcode. – RishiG Nov 20 '13 at 19:28