Probleme avec loadlibrary
salut
j ai un capteur et j aimerais gerer les donnes du capteur via matlab. pour cela j utilse la fonction
Code:
loadlibrary('se2usbapi.dll', 'se2usbapi.h', 'mfilename', 'monfichierproto')
mais je recois un message d erreur
Code:
There was an error loading the library "C:\DLLs\se2usbapi.dll"
j ai essaye plusieur propositions des forums et tutoriels et j ai toujour le meme message.
j aimerai savoir s il est possible de modifier les code
pour qu' il puisse fonctioner avec
merci
erreur avec la methode mex
Salut
j ai abandoner l idée d´utiliser j ai programmé une Dll en Visual c++ 2010. je compile mon programme sans erreur sous vc++ mais sous matlab j´ai l´erreur suivante:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
>> mex -v GetSensor.cpp
-> Default options filename found in C:\Documents and Settings\er\Application Data\MathWorks\MATLAB\R2011b
----------------------------------------------------------------
-> Options file = C:\Documents and Settings\er\Application Data\MathWorks\MATLAB\R2011b\mexopts.bat
MATLAB = C:\PROGRA~1\MATLAB\R2011B
-> COMPILER = lcc
-> Compiler flags:
COMPFLAGS = -c -I"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup
OPTIMFLAGS = -DNDEBUG
DEBUGFLAGS = -g4
arguments =
Name switch = -Fo
-> Pre-linking commands =
-> LINKER = lcclnk
-> Link directives:
LINKFLAGS = -tmpdir "." -dll "C:\PROGRA~1\MATLAB\R2011B\extern\lib\win32\lcc\mexFunction.def" -L"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\lib" -libpath "C:\PROGRA~1\MATLAB\R2011B\extern\lib\win32\lcc" "C:\DOCUME~1\ERIC~1.LAN\LOCALS~1\TEMP\MEX_JU~1\templib2.obj"
LINKDEBUGFLAGS =
LINKFLAGSPOST = libmx.lib libmex.lib libmat.lib
Name directive = -o "GetSensor.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = lrc -I"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\include" -noregistrylookup -fo"mexversion.res"
-> Resource Linker =
----------------------------------------------------------------
--> lcc -c -I"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup -FoC:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\GetSensor.obj -IC:\PROGRA~1\MATLAB\R2011B\extern\include -IC:\PROGRA~1\MATLAB\R2011B\simulink\include -DNDEBUG -DMX_COMPAT_32 GetSensor.cpp
lcc preprocessor warning: .\GetSensor.h:19 GetSensor.cpp:1 No newline at end of file
Warning GetSensor.cpp: 88 local `int j' is not referenced
Warning GetSensor.cpp: 88 local `int i' is not referenced
0 errors, 3 warnings
--> lcc -c -I"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup "C:\PROGRA~1\MATLAB\R2011B\sys\lcc\mex\lccstub.c" -Fo"C:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\templib2.obj"
Contents of C:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\mex_tmp.rsp:
C:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\GetSensor.obj
--> lcclnk -o "GetSensor.mexw32" -tmpdir "." -dll "C:\PROGRA~1\MATLAB\R2011B\extern\lib\win32\lcc\mexFunction.def" -L"C:\PROGRA~1\MATLAB\R2011B\sys\lcc\lib" -libpath "C:\PROGRA~1\MATLAB\R2011B\extern\lib\win32\lcc" "C:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\templib2.obj" -s @C:\DOCUME~1\ER~1.L\LOCALS~1\TEMP\MEX_JU~1\MEX_TMP.RSP libmx.lib libmex.lib libmat.lib
Specified export _mexFunction is not defined
Missing exports. Aborting
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Link of 'GetSensor.mexw32' failed.
Error using mex (line 206)
Unable to complete successfully. |
je n arrive pas a comprendre pourquoi j ai cette erreur.
j aimerais bien avoir une idée de ce qui peut avoir genere cette erreur.
merci