Add library / source files path for SFunction when using Rapid Accelerator

조회 수: 5 (최근 30일)
daniel_sch_ac
daniel_sch_ac 2015년 9월 18일
편집: daniel_sch_ac 2015년 9월 25일
Hi all,
i'm using a Simulink model, which contains a s function to include custom c code. When using normal or accelerated mode in Simulink, everything works fine as i can use the following mex command:
mex('-largeArrayDims','-I..\CodeFramework\lib\','-I..\CodeFramework\src\','sfuncCustomCppCode.cpp','-g');
The sfunc-cpp file contains various #include commands to include all files needed for the code to "work" as intended. The includes are done as follows:
#include "subfolder\file.hpp"
Here, subfolder is a folder either in the folder "src" or in the folder "lib". Unfortunately, this does not work for rapid accelerator mode as it is not able to detect the additional source files located somewhere in a folder with the two subfolders "lib" and "src". As I need some files from both folders (but may not use files from "lib" in the future), they are both added via "-I" in the mex command.
However,if I change the includes to complete relative paths, e.g.
#include "..\CodeFramework\src\subfolder\file.hpp"
it works. The problem is, I can not use these complete relative paths, as they may change due to different storage locations on different computers and so on. In the mex commands, this is done programmatically as the right path is detected and then used in the mex command.
Is there a possibility to run the rapid accelerator with similar commands as the mex command?
Thanks for your help and greetings, Daniel

답변 (0개)

카테고리

Help CenterFile Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by