[ghemical-devel] Some more build issues.

Jean Bréfort jean.brefort at normalesup.org
Sun Jul 3 08:56:32 EDT 2005


Hi,

I found other build issues:

In file included from ./filetrans.h:16,
                 from ./filetrans.cpp:10:
./appconfig.h:63:1: warning: "PACKAGE_NAME" redefined
In file included from ./filetrans.h:13,
                 from ./filetrans.cpp:10:
/usr/local/include/ghemical/libconfig.h:71:1: warning: this is the
location of the previous definition

I think that including a *config.h file in headers is generally a very
bad idea and should be done only if absolutely necessary. If necessary
(seems it is the case for some files), it is possible to use a solution
like the one used in openbabel:

AM_CONFIG_HEADER(src/config.h)
...
AC_CONFIG_COMMANDS([src/libconfig.h], 
                [cat src/config.h | grep -v PACKAGE >src/libconfig.h])

and add #include <config.h> in cpp files when the PACKAGE* variables are
needed (i.e. nowhere in libghemical).

When compiling ghemical on an amd64, I get lot of messages like this
one:
./project.cpp:2804: warning: cast from pointer to integer of different
size.

This MUST be fixed. It is quite unsafe. If you try to convert the 32
bits int back to a pointer, you will probably have crashes (it will
occur if the object is on the stack).

I also think you should use openbabel-2 for gchemical-2. I can help with
that if needed.

Best regards,
Jean



More information about the ghemical-devel mailing list