Unable to link Phidget21 Library in XCode 4.4.1

Supporting 10.7 and up
musanim
Phidgetsian
Posts: 5
Joined: Tue Jul 03, 2012 11:58 am
Contact:

Unable to link Phidget21 Library in XCode 4.4.1

Postby musanim » Sat Aug 25, 2012 2:38 pm

After upgrading from XCode 4.3.x to 4.4.1, I'm unable to link my Phidgets-based application. The symptoms are:

1. When I try to add the Phidgets21 library/framework to the project, it doesn't appear in the provided list of frameworks, and has to added manually (from /Library/Frameworks/Phidget21.framework).

2. When I try to build the application (with the framework added manually), the build fails with a link error:

ld: framework not found Phidget21

Does anybody have any experience with this? A fix and/or work-around?

Stephen

musanim
Phidgetsian
Posts: 5
Joined: Tue Jul 03, 2012 11:58 am
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby musanim » Sun Aug 26, 2012 8:45 pm

I solved this problem by copying Phidget21.framework to /Developer/Library/Frameworks and referring to this in XCode.

dejeroen
Fresh meat
Posts: 2
Joined: Thu Dec 20, 2012 8:38 am
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby dejeroen » Thu Dec 20, 2012 8:45 am

I have the same issue.

/Developer/Library/Frameworks
isn't a folder on OS X 10.8 so i can't try that. When adding the phidget21.framework to my project (Build Phases -> Link Binary With Libraries) It already gives an error when building the the app. I haven't even included the header file yet...

Have this issue on OS X 10.8.2, Xcode 4.4.1. The example code from cocoa isn't working either.

User avatar
Patrick
Lead Developer
Posts: 3100
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby Patrick » Thu Dec 20, 2012 9:50 am

Make sure your SDK is set as the current os, otherwise it won't look in /Library/Frameworks.

-Patrick

dejeroen
Fresh meat
Posts: 2
Joined: Thu Dec 20, 2012 8:38 am
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby dejeroen » Thu Dec 20, 2012 10:22 am

Patrick wrote:Make sure your SDK is set as the current os, otherwise it won't look in /Library/Frameworks.

-Patrick


How do I do this? Sorry i'm new with programming on mac

EDIT: I'm using Xcode 4.5.2
EDIT2: Base SDK in my project is set to "Latest OS X (OS X 10.8)"

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

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby ebya » Thu Feb 14, 2013 11:36 pm

Hi,

Got exactly the same linker problem.

I've double checked the framework location

OS X : 10.7.5
Xcode : 4.4.1

Remembers me some troubles I got time ago with other frameworks... too long ago to still have the answer.

EDIT : I tried to compile by command lines, still perfectly works. But I'd love to to dit in xcode :/
EDIT2 : try to cpy to Dev/Lib/Fram but still go the same errors; update xcode to 4.6 (for cuda issues) still not working.

Bvis222
Fresh meat
Posts: 4
Joined: Sun Feb 17, 2013 8:45 pm
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby Bvis222 » Sun Feb 17, 2013 8:50 pm

I'm getting the same error ('Phidget21/phidget21.h' file not found). I've tried all the suggestions that I could actually do but have had no luck. I'm on OSX 10.8.2 and Xcode 4.6.

I sure would like to get this solved.

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

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby ebya » Sun Feb 17, 2013 9:26 pm

If the file is not found, it just came from your frameworks search path, in building settings just add /Library/Frameworks ine the search path, the file will be found.


If it's a linker error just wait and hope someone will figure it out.

Bvis222
Fresh meat
Posts: 4
Joined: Sun Feb 17, 2013 8:45 pm
Contact:

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby Bvis222 » Sun Feb 17, 2013 10:28 pm

tried the search path thing already and that did not work

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

Re: Unable to link Phidget21 Library in XCode 4.4.1

Postby ebya » Mon Feb 18, 2013 12:10 am

Is your include #include <Phidget21/phidget21.h> ?

have you checked that the framework is in the good directory?

Did the example runs on terminal?
(cd to example directory, gcc exmaple_you_want_to_run.c -o name_of_your_choice -framework Phidget21 -I/Library/Frameworks/Phidget21.framework/Headers and then run the .exe generated, if it doesn't works your framework should be in another directory, just move it to the good one, if it works, you may have made a mistake on xcode, fix it, and you will just have linker's error instead... :/)


Return to “macOS”

Who is online

Users browsing this forum: No registered users and 3 guests