Effacer les filtres
Effacer les filtres

Mex file compilation given include files and library files

1 vue (au cours des 30 derniers jours)
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR le 27 Mar 2019
Commenté : Ashish Meshram le 13 Avr 2021
Hello everyone,
The following is what i want to run:
function make()
mex -g -I C:\Program Files\UHD\include\uhd\multi_usrp.hpp ../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\UHD\lib\uhd.lib;
% mex -g -I ../MATLAB_USRP_INTERFACE/uhdinterface.cpp C:\Program Files\UHD\include\uhd\usrp\multi_usrp.hpp C:\Program Files\UHD
% mex -g -I ../MATLAB_USRP_INTERFACE/multi_usrp.hpp ../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 ../MATLAB_USRP_INTERFACE/uhd.lib;
% mex -g -L ../MATLAB_USRP_INTERFACE/uhd.lib -I ../MATLAB_USRP_INTERFACE/multi_usrp.hpp ;
% mex -g -L C:\ProgramFiles\UHD\lib\uhd.lib ;
end
However i get the following error:
make
C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL: Error: 'C:\Program' not found.
Unable to complete successfully.
Error in make (line 17)
mex -g -I C:\Program Files\UHD\include\uhd\multi_usrp.hpp ../MATLAB_USRP_INTERFACE/uhdinterface.cpp
../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB
Now what can be wrong?
Thanks a lot
  4 commentaires
Aliza Abdul Gani Shaikh
Aliza Abdul Gani Shaikh le 10 Mai 2019
Thanks alot Vinayak,
it worked!!!!!!
Ashish Meshram
Ashish Meshram le 13 Avr 2021
Hi Vinayak
I have seen lot of your questions realted to uhdinterface. Were you able to use it.
Thanks
Ashish

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 27 Mar 2019
Modifié(e) : Jan le 27 Mar 2019
Replace
mex -g -I C:\Program Files\UHD\include\uhd\multi_usrp.hpp ...
by
mex -g -I "C:\Program Files\UHD\include\uhd\multi_usrp.hpp" ...
You need this, whenever a space occurs in the path or file name.
  6 commentaires
Jan
Jan le 30 Mar 2019
Your code tries to include uhd/usrp/multi_usrp.hpp, but this file is not found. Do you include this by:
include <uhd/usrp/multi_usrp.hpp>
% or
include "uhd/usrp/multi_usrp.hpp"
? Is the parent folder of /uhd/usrp/ included in the provided library paths?
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR le 30 Mar 2019
No, actually i had to just include a library called uhd.lib in the mex command. There was a problem doing that. Now everything is sorted out. I have the MEX file now, FINALLY!!!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by