Skip to content

February 23, 2013

duplicate symbol MyFunction in xcode

by noise

If you get the following error when trying to compile a C (or Objective C) program in XCode:

duplicate symbol MyFunction

(null): 1 duplicate symbol for architecture x86_64

then the problem is that you’ve included a .c file using #include directive or #import directive instead of including the .h file.

If you’ve created some functions in a separate .c file (or .m file) don’t just import that file in your main file but create a header file too and move header definitions to that file.

Read more from C Noise

Leave a Reply

required
required

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments