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

MATLAB 64bit error loading library


  • Please log in to reply
1 reply to this topic

#1 matt.bondy

matt.bondy
  • Members
  • 8 posts

Posted 07 November 2012 - 07:57 AM

I am trying to use a Labjack U3 with MATLAB 7.10.0 R2010a 64bit.

If I try using the U3_Simple_Analog script (or simple digital, I did not try any others) I observe this error message:

??? Error using ==> loadlibrary at 368
Failed to preprocess the input file.
 Output from preprocessor is:'cl' is not recognized as an internal or external command,
operable program or batch file.


Error in ==> ljud_LoadDriver at 10
	loadlibrary('labjackud',header);

Error in ==> U3_Simple_Digital at 12
ljud_LoadDriver; % Loads LabJack UD Function Library

I have installed Visual C++ 2008 Express Edition following this webpage on the Mathworks site: http://www.mathworks...lution=1-6IJJ3L
I checked my installation following these instructions: http://mathforum.org...ssageID=6966454
I have tried getting the 64bit driver as per this webpage: http://labjack.com/s...ckud-dll-64-bit
I also tried this:
Sometimes this is caused by 64-bit systems, since the file will be in C:\program files(x86)\LabJack\drivers instead of C:\Program files\LabJack\Drivers.
Other things you can try are putting the header file into an easier to find spot C:\header\ or something similar then changing the path links. Sometimes it's a problem with folder names being more than 8 characters.

Any assistance would be greatly appreciated,
- Matthew Bondy

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 07 November 2012 - 04:04 PM

I am trying to use a Labjack U3 with MATLAB 7.10.0 R2010a 64bit.

If I try using the U3_Simple_Analog script (or simple digital, I did not try any others) I observe this error message:

??? Error using ==> loadlibrary at 368
Failed to preprocess the input file.
 Output from preprocessor is:'cl' is not recognized as an internal or external command,
operable program or batch file.


Error in ==> ljud_LoadDriver at 10
	loadlibrary('labjackud',header);

Error in ==> U3_Simple_Digital at 12
ljud_LoadDriver; % Loads LabJack UD Function Library

I have installed Visual C++ 2008 Express Edition following this webpage on the Mathworks site: http://www.mathworks...lution=1-6IJJ3L
I checked my installation following these instructions: http://mathforum.org...ssageID=6966454
I have tried getting the 64bit driver as per this webpage: http://labjack.com/s...ckud-dll-64-bit
I also tried this:
Sometimes this is caused by 64-bit systems, since the file will be in C:\program files(x86)\LabJack\drivers instead of C:\Program files\LabJack\Drivers.
Other things you can try are putting the header file into an easier to find spot C:\header\ or something similar then changing the path links. Sometimes it's a problem with folder names being more than 8 characters.

Any assistance would be greatly appreciated,
- Matthew Bondy


The error with "cl is not recognized" is typically referring to the compiler not being set up properly.

We aren't sure why Matlab requires a compiler to be installed to call .dll functions (nothing else does) but it very often causes headaches for Matlab users. Matlab is also very picky about which compilers are set up in what ways with different versions of Matlab making it even more complicated. The instructions you link are for R2008b which might be different from R2010a. There is some more information about which compilers are valid and how they must be configured for version R2010a here: http://www.mathworks...n64.html#matlab

The bottom of the page has some more information on settings you might need to configure.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users