Variables in call to mex
Show older comments
I want to compile about 20 cpp files using the same include and library directories. For this reason, I want to define the directories once and then use them as variables in the mex calls. If I have
mex file1.cpp -LC:/folder1 -LC:/folder2 -LC:/folder3
mex file2.cpp -LC:/folder1 -LC:/folder2 -LC:/folder3
mex file3.cpp -LC:/folder1 -LC:/folder2 -LC:/folder3
I would instead like to write
FOLDER1='C:/folder1'
FOLDER2='C:/folder2'
FOLDER3='C:/folder3'
mex file1.cpp -LFOLDER1-LFOLDER2 -LFOLDER3
mex file2.cpp -LFOLDER1-LFOLDER2 -LFOLDER3
mex file3.cpp -LFOLDER1-LFOLDER2 -LFOLDER3
but it does not seem to work?
Accepted Answer
More Answers (1)
Anders
on 5 Oct 2014
0 votes
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!