using mex with variable_name(which contains file name) and with -lname switch
显示 更早的评论
I want to compile a .c file using mex command. file name is contained in the variable 'file'. To compile this file i have to use
mex(file);
But i also want to use the switch -lname. How to use the switch in this command
采纳的回答
更多回答(1 个)
arun kumar
2015-3-27
0 个投票
check out eval command....then you can do eval('mex(',file,')','-lname'); eval uses the value stored in a variable. i hope this is what you wanted
2 个评论
Rajalakshmi Rengasamy
2015-3-30
Jan
2015-3-30
I strongly recommend to avoid eval. There are better solutions in every case.
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Compiler 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!