简体   繁体   中英

Xcode C++ library location

I'm pretty new to Xcode and C++. I was wondering if there is a place to store custom libraries so that I don't have to drag them into each project. I'd like to be able to just say '#include "mylib.h"'

Is that possible?

Mac like any other system use /usr/include, /usr/lib and /usr/local/include, /usr/local/lib.

Additionaly in XCode < 4.2 you can find headers and libs in /Developer/SDKs/MacOSX10.X.sdk/usr/lib

in XCode >= 4.3 this sdk is inside /Application/Xcode.app bundle you can assign include directory using -I parameter to specify include dir path, and -L to specify lib dir path. Both can be add in build settings in project settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM