[Debichem-devel] Bug#467498: unable to compile test program

iw9cmd flavio iw9cmd at libero.it
Mon Feb 25 22:02:08 UTC 2008


Package: libopenbabel-dev
Version: 2.1.1-2

Hi,
I can't compile this simple cpp source linking it against libopenbabel with -pedantic switch:
-----------------------------8<-------------------------
prova.cpp:

#include <cstring>
#include <openbabel/mol.h>

int main(int argc, char** argv){

     OpenBabel::OBMol p;
}
-----------------------------8<-------------------------

flavio at obelix:~$ g++-4.2 -o conftest -I/usr/include/openbabel-2.0 -pedantic -lopenbabel prova.cpp
In file included from /usr/include/openbabel-2.0/openbabel/generic.h:29,
                 from /usr/include/openbabel-2.0/openbabel/base.h:32,
                 from /usr/include/openbabel-2.0/openbabel/atom.h:33,
                 from /usr/include/openbabel-2.0/openbabel/mol.h:41,
                 from prova.cpp:3:
/usr/include/openbabel-2.0/openbabel/math/vector3.h:276: error: extra ‘;’
/usr/include/openbabel-2.0/openbabel/math/vector3.h:281: error: extra ‘;’
/usr/include/openbabel-2.0/openbabel/math/vector3.h:286: error: extra ‘;’
/usr/include/openbabel-2.0/openbabel/math/vector3.h:291: error: extra ‘;’
/usr/include/openbabel-2.0/openbabel/math/vector3.h:296: error: extra ‘;’
/usr/include/openbabel-2.0/openbabel/math/vector3.h:301: error: extra ‘;’
In file included from /usr/include/openbabel-2.0/openbabel/base.h:32,
                 from /usr/include/openbabel-2.0/openbabel/atom.h:33,
                 from /usr/include/openbabel-2.0/openbabel/mol.h:41,
                 from prova.cpp:3:
/usr/include/openbabel-2.0/openbabel/generic.h:147: error: comma at end of enumerator list
In file included from /usr/include/openbabel-2.0/openbabel/atom.h:33,
                 from /usr/include/openbabel-2.0/openbabel/mol.h:41,
                 from prova.cpp:3:
/usr/include/openbabel-2.0/openbabel/base.h:89: error: extra ‘;’
In file included from /usr/include/openbabel-2.0/openbabel/atom.h:34,
                 from /usr/include/openbabel-2.0/openbabel/mol.h:41,
                 from prova.cpp:3:
/usr/include/openbabel-2.0/openbabel/residue.h:270: error: comma at end of enumerator list
/usr/include/openbabel-2.0/openbabel/residue.h:288: error: comma at end of enumerator list
/usr/include/openbabel-2.0/openbabel/residue.h:355: error: comma at end of enumerator list
/usr/include/openbabel-2.0/openbabel/residue.h:373: error: comma at end of enumerator list

but whithout the -pedantic switch the compilation works.

I'm using
Debian GNU/Linux lenny/sid, linux-image 2.6.21-2-amd64, libc6 2.7-4

iw9cmd flavio

-- 
Jabber Id:  iw9cmd_flavio at jabber.linux.it







More information about the Debichem-devel mailing list