Xcode 4.6 Apple linker's Error

Supporting 10.7 and up
Post Reply
ebya
Phidgetsian
Posts: 10
Joined: Thu Feb 14, 2013 11:28 pm
Contact:

Xcode 4.6 Apple linker's Error

Post by ebya »

As musain got his problem solved and seems a bit different from mine, I don't want to spam on his thread anymore.

Set-up :
Xcode 4.6
OS X : 10.7/5

I've tried to put the frameworks in Developer/Library/frameworks but I still got a linker error for each functions.

The header is found (seems found as there is no error on this line), examples files works (ONLY in terminal, not in XCode).

I can't downgrade XCode to a previous version (where everything was fine) for Cuda issues, I'll like to avoid to work with makefile.

Undefined symbols for architecture x86_64:
"_CPhidgetAdvancedServo_create", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_getAccelerationMin", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_getMotorCount", referenced from:
display_properties(_CPhidgetAdvancedServo*) in main.o
"_CPhidgetAdvancedServo_getPosition", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_getVelocityMax", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_setAcceleration", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_setEngaged", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_setPosition", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_setVelocityLimit", referenced from:
servo_simpleA() in main.o
"_CPhidgetAdvancedServo_set_OnPositionChange_Handler", referenced from:
servo_simpleA() in main.o
"_CPhidget_close", referenced from:
servo_simpleA() in main.o
"_CPhidget_delete", referenced from:
servo_simpleA() in main.o
"_CPhidget_getDeviceName", referenced from:
AttachHandler(_CPhidget*, void*) in main.o
DetachHandler(_CPhidget*, void*) in main.o
"_CPhidget_getDeviceType", referenced from:
display_properties(_CPhidgetAdvancedServo*) in main.o
"_CPhidget_getDeviceVersion", referenced from:
display_properties(_CPhidgetAdvancedServo*) in main.o
"_CPhidget_getErrorDescription", referenced from:
servo_simpleA() in main.o
"_CPhidget_getSerialNumber", referenced from:
AttachHandler(_CPhidget*, void*) in main.o
DetachHandler(_CPhidget*, void*) in main.o
display_properties(_CPhidgetAdvancedServo*) in main.o
"_CPhidget_open", referenced from:
servo_simpleA() in main.o
"_CPhidget_set_OnAttach_Handler", referenced from:
servo_simpleA() in main.o
"_CPhidget_set_OnDetach_Handler", referenced from:
servo_simpleA() in main.o
"_CPhidget_set_OnError_Handler", referenced from:
servo_simpleA() in main.o
"_CPhidget_waitForAttachment", referenced from:
servo_simpleA() in main.o
ld: symbol(s) not found for architecture x86_64
The code is from the example provided.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by Patrick »

Ok, to be clear: you have the latest libraries installed, and you are trying to compile/run one of our XCode examples?

I'm on 10.8 and it works fine. Xcode does sometimes have trouble with finding the framework, especially if your target is not the current os.

-Patrick
ebya
Phidgetsian
Posts: 10
Joined: Thu Feb 14, 2013 11:28 pm
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by ebya »

Last library installed and I try to run example in Xcode.

Will try to update os X to 10.8.

Edit : Updated to OS X : 10.8.2 still the same errors. Can you make a screenshot of your Xcode build setting, I'll check if I put everything like it should be.

Is there a way to check if I really got the last library? :: found Phidget21-version 2.1.8 build Dec 18 2012.

(By the way, sorry for my English, I'm from Japan).
ebya
Phidgetsian
Posts: 10
Joined: Thu Feb 14, 2013 11:28 pm
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by ebya »

Any news ? :/
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by Patrick »

I'm using the build settings of the examples - no modifications.

Make sure you use the Lion target - the other one is for pre-lion.

-Patrick
ebya
Phidgetsian
Posts: 10
Joined: Thu Feb 14, 2013 11:28 pm
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by ebya »

What do you mean? If i can run the example compiling them by terminal, the error should come from my Xcode set up.

To be clear, is there anything else to change than the fw search path? If there isn't, I don't understand then :/

I've tried to move the fw to dev/lib/fw as the other post said it but I still got the same linker's errors.

Here are my Xcode setups.
Attachments
Capture d’écran 2013-02-26 à 02.28.56.png
Capture d’écran 2013-02-26 à 02.28.56.png (47.57 KiB) Viewed 34277 times
Capture d’écran 2013-02-26 à 02.28.44.png
Capture d’écran 2013-02-26 à 02.28.44.png (85.85 KiB) Viewed 34277 times
Capture d’écran 2013-02-26 à 02.28.28.png
Capture d’écran 2013-02-26 à 02.28.28.png (73.45 KiB) Viewed 34277 times
ebya
Phidgetsian
Posts: 10
Joined: Thu Feb 14, 2013 11:28 pm
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by ebya »

Well, no more error, the only change since last try was to update OS X version (bug fix on macbook air) and every things works perfectly now.

So I've got 2 weeks to set-up the movement for the tracking algorithm. Time to work :)
Steven
Fresh meat
Posts: 2
Joined: Tue Apr 04, 2017 11:58 pm
Contact:

Re: Xcode 4.6 Apple linker's Error

Post by Steven »

ebya wrote:Well, no more error, the only change since last try was to update OS X version (bug fix on macbook air) and every things works perfectly now.

So I've got 2 weeks to set-up the movement for the tracking algorithm. Time to work :)
Quite the same problems with you! How do you solve it(maybe settings or linker flags?)
My platform is Xcode8 Sierra
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest