Use solver in C++ environment

Hi Martin,

I quickly added support for external cost on this branch:

Please test running the following, after cleaning the build folder in the Matlab example:


using
test_template_pendulum_ocp('ext_cost')

Let me know, if it also works for your problem.

Cheers,
Jonathan