[Gambas-devel] linkage errors with updated gcc-4.1 versions

José L. Redrejo Rodríguez jredrejo at ...133...
Thu Jul 13 11:35:07 CEST 2006


Hi, Benoît, Compiling gambas 1.9.33 with current gcc-4.1 versions causes
the compilation fail due to some restrictions in the scope of the
variables declaration.
The fails are explained here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227#c8

The errors I get are:
gstring.h: At global scope:
gstring.h:32: error: previous declaration of 'GB_INTERFACE GB' with 'C
++' linkage
main.cpp:48: error: conflicts with new declaration with 'C' linkage
gstring.h:33: error: previous declaration of 'QT_INTERFACE QT' with 'C
++' linkage
main.cpp:49: error: conflicts with new declaration with 'C' linkage
make[6]: *** [main.lo] Error 1


According to the above link, it seems that the new versions of gcc are
applying this restriction:
The standard says in 7.5/5: "If two declarations of the same function or
object
specify different linkage-specifications [...] the program is ill-formed if the
declarations appear in the same translation unit [...]"

Maybe this problem will appear in more parts of the code...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje est? firmada	digitalmente
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20060713/5f7773ae/attachment.sig>


More information about the Devel mailing list