简体   繁体   中英

Xcode: How to set up a C++ Project with Libraries

I am very new to C++ and have been following some tutorials online. I have downloaded the libraries and .h files they use and included them in my file structure.

However I get this error:

'Apple Mach-0 Linker (id) Error...'

What does this mean exactly?

The simplest way is to:

Open Xcode. Go to:

File -> New -> Project -> Mac OS X -> Application -> Command Line Tool

Specify project name and set type to C++

To add libraries you have to specify the header search paths and path to .a files. It can be done in project build settings

You might want to take a look here: header search path in XCode 4

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