include files
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello! Help me please.I want to use Ogre3D in mex (for s-function). http://www.ogre3d.org/ But my .cpp file contains OGRE's include files which Matlab doesn't see. In Visual Studio it can be adjusted in properties of solution. http://s001.radikal.ru/i196/1104/e6/e04d2a5746f8.jpg Is it possible to make so in Matlab? I will be grateful for any answer.Thank you.
0 Kommentare
Akzeptierte Antwort
Jarrod Rivituso
am 2 Apr. 2011
When you use the mex function, you should be able to use the -I flag to specify the include directories.
Is that what you are looking for?
5 Kommentare
Jarrod Rivituso
am 2 Apr. 2011
Hi Natalia,
You need to put both the include path and the source files. So, for instance...
mex -IC:\OgreSDK\samples\include mymexfile.c
Walter Roberson
am 4 Apr. 2011
getenv() requires the name of an environment variable as its input, such as
getenv('OGRE_HOME')
to verify that OGRE_HOME is set.
Weitere Antworten (2)
Natalia
am 2 Apr. 2011
1 Kommentar
Jarrod Rivituso
am 2 Apr. 2011
Yes, you will need to add each include path and the library directories. Use the -l and -L flags to add library paths (-l) and actual library files (-L).
Again, the documentation has a table of all supported compiler switches:
http://www.mathworks.com/help/techdoc/ref/mex.html
Siehe auch
Kategorien
Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!