[Open Babel] need help using the openbabel toolkit

2010-02-17 Thread sam moors

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

/tmp/ccbdQkQz.o: In function `main':
convert.cpp:(.text+0x19c): undefined reference to 
`OpenBabel::OBConversion::OBConversion(std::basic_istream >*, std::basic_ostream >*)'
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.
https://signup.live.com/signup.aspx?id=60969--
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


Re: [Open Babel] need help using the openbabel toolkit

2010-02-17 Thread Tim Vandermeersch
Hi,

On Wed, Feb 17, 2010 at 4:08 PM, sam moors  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 std::char_traits >*, std::basic_ostream
>>*)'
> 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