grimme-lab / xtb_docs

https://xtb-docs.readthedocs.io/en/latest/
Creative Commons Attribution Share Alike 4.0 International
35 stars 35 forks source link

Addressed compilation error: double energy was not defined. #75

Closed pultar closed 2 years ago

pultar commented 2 years ago

The minimal example from the C API does not compile because the variable double energy has never been defined.

Signed-off-by: Felix Pultar felix.pultar@phys.chem.ethz.ch

pultar commented 2 years ago

I also had to include a header file that defines NULL (using a C++ 11 compiler):

#include <cstddef>

Let me know if you want that addition included as well.

awvwgk commented 2 years ago

It's a C example, therefore we should use the C header.


There were discussions in the past whether xtb should provide a C++ header as well, I didn't really get around to develop a proper C++ API for xtb, but I think it would be desirable to have a more C++ friendly way to work with the C-API than relying on C and C++ being just similar enough to work.