Header-Only HPP File
This example creates a MATLAB® interface to a C++ library named school
. The library is
defined in the header file school.hpp
and does not have a compiled library
file. A library defined completely by its header file is called a
header-only library.
Library Artifacts | MATLAB Package libname | MATLAB Help |
---|---|---|
Header file |
|
|
This library defines classes representing students and teachers. After you publish this
library, MATLAB users can call functions in the clib.school
package to create
Student
and Teacher
objects and specify names and
ages.
MATLAB provides the header file for you to use in this example in this folder:
fullfile(matlabroot,"extern","examples","cpp_interface");
Use these steps to create a school
interface for Windows®.