mex compile cannot find path to C/C++ Libraries - Example: lcc preprocessor error: .\class_handle.hpp:4 SysSimChan​nelInterfa​ce.cpp:2 Could not find include file stdint.h

I'm trying to compile a mex file using the Matlab C/C++ compiler. I understood that C/C++ std libraries are automatically included, but I get these error messages:
lcc preprocessor error: .\class_handle.hpp:4 SysSimChannelInterface.cpp:2 Could not find include file stdint.h
lcc preprocessor error: .\class_handle.hpp:5 SysSimChannelInterface.cpp:2 Could not find include file string
This is actually not from my code, but from an hpp file I downloaded from Matlab Central (by Oliver Wood). (See "Making C++ objects persistent between mex".) The hpp file is included in the cpp file that I'm trying to compile with the mex command in Matlab.
It appears that the compiler doesn't know where the libraries are. I tried setting a Matlab path to the VC++ location, and that didn't help.
JSS

回答 (1 件)

Jan
Jan 2013 年 4 月 29 日
編集済み: Jan 2013 年 4 月 29 日

0 投票

LCC is a C-compiler, which cannot compile C++ code.
When you have MSVC installed, use this for compilations.

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

製品

質問済み:

2013 年 4 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by