I tried to call matlab from a .cpp file. I used the following command to compile engdemo.cpp which includes \"engine.h\"
engdemo.cpp
\"engine.h\"
g++ engde
Following up on what @Kurt S said, you'll need to include libraries. These are common ones you'll need: libeng.lib libmat.lib libmx.lib, but you might need others.
Thus you want to add the linking options -llibeng -llibmat -llibmx
-llibeng -llibmat -llibmx
But you might need others as well.