Dynamic and Shared Libraries

조회 수: 6 (최근 30일)
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR 2019년 4월 10일
댓글: VINAYAK KARANDIKAR 2019년 4월 10일
Hello everyone,
I have a .dll file that i have downloaded from the internet. This file has been reported as a dependancy by the walker software. I am trying to include it in my MEX command. However i get an error while compiling. I have saved the .dll file to the same folder from where i run the make file which contains the mex command.
How do i sort it out?
mex msvcr7.lib
LINK : fatal error LNK1181: cannot open input file 'msvcr7.lib'
  댓글 수: 6
Walter Roberson
Walter Roberson 2019년 4월 10일
-lmsvcr7
Ignore the API-MS entries.
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR 2019년 4월 10일
@Walter Roberson
I tried this:
function make()
mex -largeArrayDims -v -g -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp -L."C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libboost_thread-vc100-mt-1_55.lib libboost_date_time-vc100-mt-1_55.lib libboost_system-vc100-mt-1_55.lib libboost_chrono-vc100-mt-1_55.lib uhd.lib libmx.lib libmex.lib libmat.lib ...
-lmsvcr7
% mex -g uhd.lib -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp
end
and i get this:
Warning: MEX could not find the library "msvcr7" specified with -l option.
MEX looked for a file with one of the names:
msvcr7.lib
libmsvcr7.lib
MEX looked for the library in the following directories:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB\amd64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\v7.1\LIB\X64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64
C:\Program Files\MATLAB\R2013b\extern\lib\win64
C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
.C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
further, i tried this:
function make()
mex -largeArrayDims -v -g -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp -L."C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libboost_thread-vc100-mt-1_55.lib libboost_date_time-vc100-mt-1_55.lib libboost_system-vc100-mt-1_55.lib libboost_chrono-vc100-mt-1_55.lib uhd.lib libmx.lib libmex.lib libmat.lib ...
-lmsvcr7.dll
% mex -g uhd.lib -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp
end
and i get this:
Warning: MEX could not find the library "msvcr7.dll" specified with -l option.
MEX looked for a file with one of the names:
msvcr7.dll.lib
libmsvcr7.dll.lib
MEX looked for the library in the following directories:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB\amd64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\v7.1\LIB\X64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64
C:\Program Files\MATLAB\R2013b\extern\lib\win64
C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
.C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
Then finally i tried this:
function make()
mex -largeArrayDims -v -g -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp -L."C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libboost_thread-vc100-mt-1_55.lib libboost_date_time-vc100-mt-1_55.lib libboost_system-vc100-mt-1_55.lib libboost_chrono-vc100-mt-1_55.lib uhd.lib libmx.lib libmex.lib libmat.lib ...
-lmsvcr7.lib
% mex -g uhd.lib -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp
end
and i get this:
Warning: MEX could not find the library "msvcr7.lib" specified with -l option.
MEX looked for a file with one of the names:
msvcr7.lib.lib
libmsvcr7.lib.lib
MEX looked for the library in the following directories:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB\amd64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\v7.1\LIB\X64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64
C:\Program Files\MATLAB\R2013b\extern\lib\win64
C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
.C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft
What do i do?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

제품


릴리스

R2013b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by