Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

64 bit matlab and LabJack U6


  • Please log in to reply
2 replies to this topic

#1 barry

barry
  • Members
  • 5 posts

Posted 10 June 2013 - 02:32 PM

Hello, I recently purchased a LabJack U6 to use with Matlab. I downloaded and installed the homebrew and exodriver successfully. When I try to run the labJack.m code (e.g., labJack('verbose',true)), I get the following error: labJack: Loading the exodriver library failed: Failed to preprocess the input file. Output from preprocessor is:gcc-4.2: Command not found. The error is being generated because it says it can't find the labjackusb.h, however, it is in the appropriate location after installation. I'm thinking that this is an issue with the fact that I'm using a 64-bit version of matlab with the exodriver. I think that this is likely to be the case because another machine in my lab is also using a U6 with the same matlab code. The only difference is that one version of matlab is 32-bit and on is 64-bit. Before switching to a 32-bit version, I wanted to check to see if anyone has had a similar experience and whether switching to the 32-bit version is the solution. best, barry

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 June 2013 - 04:13 PM

We don't have a copy of 32 and 64 bit MATLAB for testing, but I believe you need Xcode installed for gcc, so make sure that is installed first.

As for the header, there are no 32 or 64 bit specific paths on OS X, just /usr/include/ and /usr/local/include/ (where we install). If you think the labjack call is having problems finding the header, you can try copying the header file to your working directory or /usr/include/, or specify the header file path in the loadlibrary call. See the loadlibrary documentation, and under the "Examples" section take a look at the "Search Alternative Paths for Header Files" for help on this:

http://www.mathworks...oadlibrary.html

#3 barry

barry
  • Members
  • 5 posts

Posted 11 June 2013 - 09:27 AM

Hi,

Thanks for the quick response.

I have the XCode command line tools installed and can call gcc from the command line. So that doesn't appear to be the issue.

It appears that the issue was that Matlab was trying to call 'gcc-4.2' rather than 'gcc'. I just set up an alias in my shell to test it and that seemed to get rid of the error.

Thanks for your help.

best,
barry


We don't have a copy of 32 and 64 bit MATLAB for testing, but I believe you need Xcode installed for gcc, so make sure that is installed first.

As for the header, there are no 32 or 64 bit specific paths on OS X, just /usr/include/ and /usr/local/include/ (where we install). If you think the labjack call is having problems finding the header, you can try copying the header file to your working directory or /usr/include/, or specify the header file path in the loadlibrary call. See the loadlibrary documentation, and under the "Examples" section take a look at the "Search Alternative Paths for Header Files" for help on this:

http://www.mathworks...oadlibrary.html




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users