Hello folks, I am trying to get started with using the OpenBabel libraries in C++. So I followed the Quickstart example on the docs at http://openbabel.org/docs/current/UseTheLibrary/CppExamples.html But it gives the following complaints upon compilation:
example.o:example.cpp:(.text+0x10c): undefined reference to `OpenBabel::OBConversion::OBConversion(std::basic_istream<char, std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> >*)' example.o:example.cpp:(.text+0x12b): undefined reference to `OpenBabel::OBConversion::SetInAndOutFormats(char const*, char const*)' example.o:example.cpp:(.text+0x15c): undefined reference to `OpenBabel::OBConversion::Convert()' example.o:example.cpp:(.text+0x19e): undefined reference to `OpenBabel::OBConversion::~OBConversion()' example.o:example.cpp:(.text+0x1d7): undefined reference to `OpenBabel::OBConversion::~OBConversion()' I verified that the compiler was accessing the file named libopenbabel.dll.a at Tools/openbabel/install/lib. It has a size of 2390908. Interestingly if I used the library at build/bin/cygopenbabel-4.dll, the compilation would finish without complaints. Just that when I subsequently run the executable, it gives the following complaint: example.exe: error while loading shared libraries: cygopenbabel-4.dll: cannot open shared object file: No such file or directory More details are given below. Any idea? Ling Chan ================================================================ I am using Cygwin on a Windows 7 laptop. I compiled my OpenBabel suites by following the instructions at http://openbabel.org/docs/2.3.1/Installation/install.html#compiling-open-babel I did not have any of the optional items (libxml2, zlib, etc.). I've also checked that the openbabel basic command, "babel", work fine. -- View this message in context: http://forums.openbabel.org/C-API-problem-with-library-linking-tp4655620.html Sent from the General discussion mailing list archive at Nabble.com. ------------------------------------------------------------------------------ WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss