Hi, On Wed, Feb 17, 2010 at 4:08 PM, sam moors <sammo...@hotmail.com> wrote: > Hi, > > I'm trying to compile the example code on this page: > > http://openbabel.org/wiki/Developer:Cpp_Tutorial > > but I get errors during compilation with this command (the header files > are installed in /home/sam/progs/openbabel-2.2.3/include): > > g++ -I/home/sam/progs/openbabel-2.2.3/include convert.cpp -o convert
You still need to link to the openbabel library: -lopenbabel (first letter is lower case L) Tim > /tmp/ccbdQkQz.o: In function `main': > convert.cpp:(.text+0x19c): undefined reference to > `OpenBabel::OBConversion::OBConversion(std::basic_istream<char, > std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> >>*)' > convert.cpp:(.text+0x1ba): undefined reference to > `OpenBabel::OBConversion::SetInAndOutFormats(char const*, char const*)' > convert.cpp:(.text+0x1ff): undefined reference to > `OpenBabel::OBConversion::Convert()' > convert.cpp:(.text+0x25d): undefined reference to > `OpenBabel::OBConversion::~OBConversion()' > convert.cpp:(.text+0x279): undefined reference to > `OpenBabel::OBConversion::~OBConversion()' > collect2: ld returned 1 exit status > > The openbabel-2.2.3 source was manually compiled on ubuntu 9.04. > > Please can anybody help? > > Thanks, > Sam > > ________________________________ > Hotmail: Trusted email with powerful SPAM protection. Sign up now. > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss