Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

[Xcode 4.4] Linker error GPIB framework

Solved!
Go to solution
Hello,
 
I am encountering issues with the NI488 framework after upgrading to Xcode 4.4.

Here are the details:
After upgrading Xcode from 4.2.1 (4D502) to 4.4 (4F250), the GPIB Framework did appear in red color in the navigator (The same way missing files do when they are still referenced in the project but removed from the file system). The issue is that the said framework is still accounted for in the appropriate location (/Library/Frameworks/...). And the only thing I did was install the newer Xcode version and re-open the project.
 
So, I did remove the framework, and added it again to the build phase of the target app. When Adding it, I noticed that the framework was not offered to me as a choice and I that I had to select it "manually". This, I thought, is not an issue since I had to do the same operation to add VISA and nidaqmxbase frameworks, in a similar way under Xcode 4.2.1.
 
Then, the compiler was unable to find the headers declared as: 
 
import <NI488/NI488.h>
 
so I was forced to use the full path:
 
#import </Library/Frameworks/NI488.framework/Versions/2/Headers/NI488.h>
 
to get the compiler to oblige. And now, I am stuck with the linker error:
 
ld: framework not found NI488
clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
Any ideas on how to solve this ?
 
Best Regards.
 
--------------------------------------
 
Additional informations :
In both case (under Xcode 4.2 and Xcode 4.4) base sdk is 10.7, target is 10.7. App is 32 bits.
 
Versions of the frameworks (VISA, 488, DAQmxBase) are the latest available on NI website.
 
 
0 Kudos
Message 1 of 9
(4,893 Views)

Hi sci01,

 

I think that your issue is more an Xcode issue and how you declare the framework than a NI 488 framework issue.

You could probably join a Xcode developer forum to get an answer.

 

Sincerely

David S.| Certified LabVIEW Associate Developer
National Instruments France


Message 2 of 9
(4,741 Views)
Solution
Accepted by topic author sci01

Thank you for your reply.
Actually I solved the issue yesterday morning. Here are my conclusions:

 

There are two sources to this error
1. The GPIB, VISA, and DAQmxBase installers don't install their framework in the appropriate location. So the linker can't find them.

2. Telling Xcode where to find the frameworks doesn't work since apparently, the information doesn't propagate to the linker.

 

Solution
1. Installing the GPIB, VISA, or DAQmxBase packages as usual.

2. Finishing the installation manually by moving the frameworks to the appropriate location.

 

0 Kudos
Message 3 of 9
(4,734 Views)

 

 

0 Kudos
Message 4 of 9
(4,734 Views)

Ok, perfect.

 

Best Regards

David S.| Certified LabVIEW Associate Developer
National Instruments France


0 Kudos
Message 5 of 9
(4,729 Views)

This is slightly off-topic, but I had to comment when I saw the action at the bottom of your posting with the NI-France information. That auto-show of a graphic when hovering over the text; AWESOME! How did you code for that???

 

Thanks,

 

Dave

0 Kudos
Message 6 of 9
(4,710 Views)

OK, the newer versions of the XCode expect frameworks in different place (relative to "/Applications/XCode/.." now, rather than the old "/Library/Frameworks" where VISA installs its frameworks)...however, you do not need to move VISA frameworks at all... Simply go to your project and in your target's "Build Settings->Search Paths" add "/Library/Frameworks" to "Framework Search Paths" setting.... that's all...

 

0 Kudos
Message 7 of 9
(4,625 Views)

Thanks for yoyr reply. This is now a solved issue (as far as I am concerned anyway). But, of course, I tried what you suggest [implied in my original message], but it didn't work at the time.

 

On 09-26-2012 05:47 AM sci01 wrote:

2. Telling Xcode where to find the frameworks doesn't work since apparently, the information doesn't propagate to the linker.

 

I can't tell if this is still the case. But currently, I have other pressing and serious issues with one of these frameworks (DAQmx base) that are keeping me busy, so I don't have the time to investigate.

 

Note: I also tried to create aliases or symbolic links to the frameworks instead of copying the full frameworks. It didn't work either.

0 Kudos
Message 8 of 9
(4,616 Views)

Hi sci01,

 

I do realize from your point of view you are sorted....i'm just adding this info for others who like me run into the same VISA problem when upgrading the XCode.

 

Framework search path does propagate to the linker - here is an snipet of linking stage ouput from XCode 4.5.2 build:

"... -F/Library/Frameworks ..."  

 

 

0 Kudos
Message 9 of 9
(4,607 Views)