Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Dec 19, 2012, 04:23 PM   #1
macrumors newbie
Join Date: May 2012
Location: USA
Adding a header file to Xcode

First off, the following question was posted already, about a few months ago in these forums; however, I seem to have a slightly different error message, and I can't find the answer for this issue in the place where I got this header file.

When building the project, I get the following error message:

Undefined symbols for architecture x86_64:
"_GetString", 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)

I installed these files using the following commands:

gcc -c -ggdb -std=c99 cs50.c -o cs50.o
ar rcs libcs50.a cs50.o
rm -f cs50.o
chmod 0644 cs50.h libcs50.a
sudo mv cs50.h /usr/include
sudo cp libcs50.a /usr/lib

My version of Xcode is: Version 4.5.2 (4G2008a) and I'm running OS X 10.7.5.

I have no clues as to how to get this to work. Thanks for any suggestions.
n00blar is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

cs50, cs50.h, edx, os x 10.7.5, xcode 4.5.2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What would make images in the header pop out on top of the rest of the header? MuckrakerJG Web Design and Development 1 Feb 2, 2014 01:53 AM
Adding an Image in Xcode 4.5 Blakeasd Mac Programming 2 Dec 15, 2012 09:34 AM
Adding an Image in Xcode 4.5 Blakeasd OS X 10.8 Mountain Lion 1 Dec 14, 2012 08:32 PM
#import or #include header file - file not found MickeyT iPhone/iPad Programming 4 Jul 2, 2012 01:58 AM
Help with adding and subtraction in Xcode kingv84 Mac Programming 5 Jun 18, 2012 04:36 PM

Forum Jump

All times are GMT -5. The time now is 02:59 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC