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 loadlibrary


  • Please log in to reply
1 reply to this topic

#1 Ton_

Ton_
  • Members
  • 1 posts

Posted 05 July 2012 - 03:57 PM

Hi
i want to connect matlab program with openCV library ,so i'm running R2009b 64-bit matlab on a windows 7 64-bit pc and VS c++ expression edition . I am having trouble loading a library, when I compiler this code



opencvPath = 'C:\Program Files (x86)\OpenCV';
includePath = fullfile(opencvPath, 'cxcore\include');

loadlibrary(...
	fullfile(opencvPath, 'bin\cxcore110.dll'), ...
	fullfile(opencvPath, 'cxcore\include\cxcore.h'), ...
		'alias', 'cxcore110', 'includepath', includePath);
loadlibrary(...
	fullfile(opencvPath, 'bin\cv110.dll'), ...
	fullfile(opencvPath, 'cv\include\cv.h'), ...
		'alias', 'cv110', 'includepath', includePath);
loadlibrary(...
	fullfile(opencvPath, 'bin\highgui110.dll'), ...
	fullfile(opencvPath, 'otherlibs\highgui\highgui.h'), ...
		'alias', 'highgui110', 'includepath', includePath);



the following error message is generated:-
?? Error using ==> loadlibrary at 367
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 ==> OPENCVV at 4
loadlibrary(...

i'm novice user in matlab language .

thanQ

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 July 2012 - 02:49 PM

Hi
i want to connect matlab program with openCV library ,so i'm running R2009b 64-bit matlab on a windows 7 64-bit pc and VS c++ expression edition . I am having trouble loading a library, when I compiler this code



opencvPath = 'C:\Program Files (x86)\OpenCV';
includePath = fullfile(opencvPath, 'cxcore\include');

loadlibrary(...
	fullfile(opencvPath, 'bin\cxcore110.dll'), ...
	fullfile(opencvPath, 'cxcore\include\cxcore.h'), ...
		'alias', 'cxcore110', 'includepath', includePath);
loadlibrary(...
	fullfile(opencvPath, 'bin\cv110.dll'), ...
	fullfile(opencvPath, 'cv\include\cv.h'), ...
		'alias', 'cv110', 'includepath', includePath);
loadlibrary(...
	fullfile(opencvPath, 'bin\highgui110.dll'), ...
	fullfile(opencvPath, 'otherlibs\highgui\highgui.h'), ...
		'alias', 'highgui110', 'includepath', includePath);



the following error message is generated:-
?? Error using ==> loadlibrary at 367
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 ==> OPENCVV at 4
loadlibrary(...

i'm novice user in matlab language .

thanQ


Matlab sometimes requires some additional tools are set up in order to run other code, if things aren't set up correctly you get errors like this. There is some info here: http://www.mathworks...mpilers/R2009b/ The issue is probably that the Express Edition may not work with that version of Matlab. You can see it works with R2010B here: http://www.mathworks...010b/win64.html

This is another useful link: http://www.mathworks...lution=1-6IJJ3L


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users