!which gcc doesn't work

4 visualizzazioni (ultimi 30 giorni)
abi aryan
abi aryan il 8 Lug 2019
Hey, pretty new to Matlab here. I am trying to get matlab to work with matconvnet so I installed the -mex compiler support for Windows using Add-Ons.
Finally, did -mex setup and this gives
configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
Now, I tried to do !which gcc to test which compiler am I using but it was giving an error that said
>> !which gcc
'which' is not recognized as an internal or external command,
operable program or batch file.
So, I figured it must be a windows thing so tried to setup a proper working which command. Installed GnuWin32 using SourceForge and downloaded the source packages but in command prompt, it still said which is not a recognized command.
Then, tried another workaround using echo
echo %~$PATH:1
and saving it as a which.cmd file under WindowsApp in Local. Now when I run !which gcc it says
>> !which gcc
C:\Users\User\Documents\Folder\matconvnet>echo
ECHO is on.
and that's it.
How do I check and confirm the default compiler on my Matlab is C++?
  1 Commento
Walter Roberson
Walter Roberson il 8 Lug 2019
mex -v -setup C++
will show you where it is finding gcc.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by