Edit mex configuration programmatically
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
I'd like to be able to edit the mex configuration programatically. There are some recent changes to the configuration options, having moved from mexopts.bat (windows) to xml files. For now let's assume I'm using the newer approach. You can query information regarding the compiler configuration using:
mex.getCompilerConfigurations
There doesn't seem to be a way to use this information to change anything.
My use case is the following. I'd like to use the flag /MDt instead of /MD for Visual Studio 2012. If I do:
COMPFLAGS="$COMPFLAGS /MDt"
The /MD flag that is present overrides the /MDt directive I passed in. Thus it seems that I need to actually remove the /MD flag in the options file.
Any suggestions?
Thanks, Jim
1 commentaire
James Tursa
le 18 Juin 2014
Modifié(e) : James Tursa
le 18 Juin 2014
In the past, I have actually opened up the old mexopts.bat file and copied it to a new file with modifications, then used that new file. I don't know how to do something similar under the new scheme where there is apparently no mexopts.bat file to work with.
Réponses (2)
James Tursa
le 18 Juin 2014
Can you go into the mexopts directory, copy all of the setup files for the compiler you are using into new files with slightly different names, then edit those new files to get the /MDt option you want? Maybe that will let the mex command see that to use. Under the new scheme, I don't know how to coax the mex command to use that option set though. Maybe make it alphabetically first in the file listing? I don't have a recent version of MATLAB to experiment with for this unfortunately. Maybe you will have to simply edit the existing mexopts files instead of creating copies.
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!