bryanherger / xdrawchem

XDrawChem is a two-dimensional molecule drawing program.
37 stars 11 forks source link

Copile error with OpenBabel 3 #18

Open M0M097 opened 3 years ago

M0M097 commented 3 years ago

I have OpenBabel 3 installed, so I changed xdrawchem.pro:

21c21
< error(OpenBabel was not found.  Edit xdrawchem.pro and add valid include and lib values)
---
> #error(OpenBabel was not found.  Edit xdrawchem.pro and add valid include and lib values)
24,25c24,25
< #INCLUDEPATH += /usr/local/include/openbabel-2.0
< #LIBS += -lopenbabel
---
> INCLUDEPATH += /usr/local/include/openbabel3
> LIBS += -lopenbabel

this leads to:

xdrawchem/ioiface.cpp:302:21: error: ‘OB_WEDGE_BOND’ was not declared in this scope
  302 |             flag |= OB_WEDGE_BOND;
      |                     ^~~~~~~~~~~~~
xdrawchem/ioiface.cpp:304:21: error: ‘OB_HASH_BOND’ was not declared in this scope
  304 |             flag |= OB_HASH_BOND;
      |                     ^~~~~~~~~~~~
zhaiyusci commented 2 years ago

Try to use the version in master branch. The released version seems not work with obabel 3.