openbabel icon indicating copy to clipboard operation
openbabel copied to clipboard

How to use openbabel as c++ library on windows with visual studio 2019

Open retinavr opened this issue 3 years ago • 2 comments

Dear everyone

I apologize if this already has been answered, but i really feel like there is missing a very important documentation on using openbabel 3-1-1 to develop software on a windows machine using visual studio. I am still a rookie at c++, but am doing a project where i need to use openbabel as a library. What shall i compile and how to use the c++ code?

I am currently downloading the source and adding the include folder to "additional include directories" in my c++ project. I then run the following code:

#include #include "openbabel/atom.h"

int main() {

return 0;

}

And i get the following error: Severity Code Description Project File Line Suppression State Error C1083 Cannot open include file: 'openbabel/atom.h': No such file or directory OBtest C:\Users\VR2\Documents\CPP_Projects\Openbabel_test\OBtest\Source.cpp 2

I feel like i am missing some .lib file to link to or some .sln file to compile the library.

Appreaciate your time.

Kind regards Zan

retinavr avatar Feb 17 '22 01:02 retinavr

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Feb 17 '22 01:02 welcome[bot]

Hi Zan, I am currently trying to use openbabel as libraries for some implementation in c++ programs and softwares I was wondering if you already figured out how to set everything up since posting this comment in 2022?

Thanks in advance

A thankful Openbabel user

moyal-eth-project avatar May 08 '23 10:05 moyal-eth-project