You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope that the error I'm encountering actually belongs to this area. However, I don't know where else to discuss it.
I tried to compile the OpenBabel source code myself under Visual Studio 2022. After downloading OpenBabel v3.1.1 from Github, I first downloaded the following optional libs and successfully compiled them all with CMake (libxml2, InChI, zlib, Eigen3, RapidJSON, wxWidgets and Cairo).
After setting various paths for optional libraries in CMake, I was able to successfully configure and generate OpenBabel in CMake and open it in Visual Studio 2022. The project was also able to be compiled (Release) in Visual Studio without any errors.
I then created a new console project and configured various paths for the include and .lib files of OpenBabel for it.
Here is the short console programm I found in the net:
#include <openbabel/obconversion.h>
#include <openbabel/mol.h>
#include <iostream>
using namespace std;
using namespace OpenBabel;
int main() {
// SMILES string
string smiles = "CCO";
// Create an OBMol object
OBMol mol;
OBConversion conv;
conv.SetInFormat("smi");
conv.ReadString(&mol, smiles);
// Get IUPAC name
string iupac_name = mol.GetTitle();
// Output IUPAC name
cout << "IUPAC name: " << iupac_name << endl;
return 0;
}
But when I tried to compile this console project, the following errors were displayed:
Error (active) E0020 The identifier ""strcasecmp"" is not defined. OpenBable C:\Libs\OpenBabel\v3.1.1\install\include\openbabel3\openbabel\plugin.h 44
Error C3861 "strcasecmp": Identifier not found. OpenBable C:\Libs\OpenBabel\v3.1.1\install\include\openbabel3\openbabel\plugin.h 44
I know that "strcasecmp" is not included in the C standard, but only in POSIX.
I'm now wondering how I can fix this error? Did I make a mistake when compiling OpenBabel?
Environment Information
Open Babel version: v3.1.1
Used optional Libs: libxml2, InChI, zlib, Eigen3, RapidJSON, Cairo, wxWidgets
Operating system and version: Windows 11 Pro x64
Compiler: Visual Studio C++ 2022
CMake GUI v3.28.1
Thx in advance for trying to help.
The text was updated successfully, but these errors were encountered:
I hope that the error I'm encountering actually belongs to this area. However, I don't know where else to discuss it.
I tried to compile the OpenBabel source code myself under Visual Studio 2022. After downloading OpenBabel v3.1.1 from Github, I first downloaded the following optional libs and successfully compiled them all with CMake (libxml2, InChI, zlib, Eigen3, RapidJSON, wxWidgets and Cairo).
After setting various paths for optional libraries in CMake, I was able to successfully configure and generate OpenBabel in CMake and open it in Visual Studio 2022. The project was also able to be compiled (Release) in Visual Studio without any errors.
I then created a new console project and configured various paths for the include and .lib files of OpenBabel for it.
Here is the short console programm I found in the net:
But when I tried to compile this console project, the following errors were displayed:
I know that "strcasecmp" is not included in the C standard, but only in POSIX.
I'm now wondering how I can fix this error? Did I make a mistake when compiling OpenBabel?
Environment Information
Open Babel version: v3.1.1
Used optional Libs: libxml2, InChI, zlib, Eigen3, RapidJSON, Cairo, wxWidgets
Operating system and version: Windows 11 Pro x64
Compiler: Visual Studio C++ 2022
CMake GUI v3.28.1
Thx in advance for trying to help.
The text was updated successfully, but these errors were encountered: