Editing mex compiler through mex setup in matlab
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am running a C++ mex file in Matlab on a new server, which does not have g++ installed, just g++-4.6. My mexopts.sh file is set to CXX='g++', and as I do not have root access on the server, am unable to do the simple fix and sudo edit that.
I have been trying to figure out how to use mex -setup, or any type of command through Matlab to set the C++ compiler, with no luck.
The best luck I had was when I tried mex CXX="g++-4.6" hello_world.cpp, and it compiled. But then I got the error "version `GLIBCXX_3.4.11' not found", which I believe is a linking artifact from my hack method of forcing it to compile.
Question: how do you edit the compiler in Matlab when you do not have root access? This is a Linux server.
0 comentarios
Respuestas (1)
Kaustubha Govind
el 10 de Mayo de 2012
When you use "mex -setup", a MEX-options file is generated into your home folder on *nix and in the Application Data folder on Windows - so you shouldn't need to have root/admin access to create/modify this file. What happens when you run mex -setup?
Note that you can always override the default mexopts.sh by using the mex -f option. For example:
>> mex -f /home/username/mymexopts.sh mymexfile.c
1 comentario
Abul Fujail
el 25 de Oct. de 2013
after setup, i try to edit and compile the existing mex file but it was showing the error "C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: 'anfischeck.c' not found."... i have copied this file in different folders and tested... plz suggest me...
Ver también
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!