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

Benoit Minisini gambas at ...1...
Thu Jul 13 14:54:54 CEST 2006


On Thursday 13 July 2006 11:35, José L. Redrejo Rodríguez wrote:
> 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...

Is it better with this 'gstring.h' file ?

-- 
Benoit Minisini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstring.h
Type: text/x-chdr
Size: 4111 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20060713/2004e8a0/attachment.h>


More information about the Devel mailing list