Using Matlab engine with C++ and CMakeLists

12 ビュー (過去 30 日間)
mikemodanoxxx
mikemodanoxxx 2012 年 5 月 5 日
Hi there,
i am trying to compile a c++ program which uses the matlab engine. This means in my cpp-File i have a #include engine.h.
Can anybody tell me how i have to modify my CMakeLists.txt to add the necessary paths? At the moment i only have:
include_directories(/usr/local/MATLAB/R2012a/extern/include)
which means during the make process the engine.h is found, but can't be linked. Which files/folders are missing?

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 5 月 7 日
This page has some instructions for compiling Engine applications in an IDE, which you might be able to infer the relevant information from. It is also useful to look at the engopts.sh file in $matlabroot/bin - this should contain all the required compiler/linker options.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by