Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Xcode Linker error: missing x86_64 in file

Hi - I am trying to access the NI488.2 framework (the equivalent to ni488.dll on Windows or on Linux) on a Mac from Java using Java Native Access. In order to do this, I need a .dylib, which is unfortunately not provided by NI.


To compile the required .dylib myself in XCode (Mac OS 10.6), I tried to build a C++ dynamic shared library following the programming examples listed in NI-488.2 manual, which is essentially to include ni488.h and include the NI488.framework.


When building the results, the linker complains with this error message:

in /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//NI488.framework/NI488, missing required architecture x86_64 in file


And here is where my expertise ends. I have noticed two slashes in the path name, but don't know what to do with that.


I get the same error message (with two slashes) when I compile the 'regular' C file listed below using cc main.c -framework NI488.



#include <stdio.h>
#include <NI488/ni488.h>

int main (int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");

int status = ibclr(4);

return status;


How can I get the code to compile? Does anybody already have a ni488.dylib?


Thanks a lot,



0 Kudos
Message 1 of 2

I think the missing x86_64 error is due to the compiling target.  I think it is because the code is written for 32 bit, and XCode defaults to compile for 64 in Snow Leopard.  You should try changing the target to 32 bit and then see if you can compile then.  This is about as much as I know.  I have never really developed in XCode I just read a bunch of forums found via google, and that is what I think the error relates to.  Good luck.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2