Re: [C++] anonymous struct linkage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/11/12 16:44, LAMOME Julien CS-SI wrote:
> Hi,
> we have a code mixing C++ and Fortran 77. In fortran, we have some COMMON like :
> COMMON / DEMOF/VARIABLE
> Which are include in fortran source file like this :
> #include <demof.include>
>
> We link with C++ code like this :
> struct { double variable}demof ;
>
> The problem is : 
> Between gcc 4.3 and gcc 4.6, the linkage of demof (in C++) change from global to local. This breaks the link between C++ and fortran.
>
> How can I restore the global linkage in gcc 4.6 ?
>
> Thanks you for your help.
It's probably not that it doesn't global linkage, but something else
like mangling (extern "C"), not going to the common section (although it
should, __attribute__ ((section ("common"))) ), that you want instead to
refer to it when defined from fortran (extern), etc.

What are you doing, how is it expected to work from each side, and what
are you getting?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux