0

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?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295
  • Could you paste the whole log ? – rockeye Jun 21 '12 at 09:35
  • Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "GetInteger()", referenced from: Main() in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) – MeltingDog Jun 21 '12 at 09:42

1 Answers1

2

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

Community
  • 1
  • 1
Andrew
  • 24,218
  • 13
  • 61
  • 90