[Insight-developers] RE: Complex vs f2c.h, "real" symbol conflicts in gcc 2.95

Lorensen, William E (Research) lorensen at crd.ge.com
Tue Jun 7 15:23:08 EDT 2005


Go for it. I'd like to get this squared away quickly, this is our coverage machine. 

BTW, complex needs to be handled in a similar way.


-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Tuesday, June 07, 2005 2:01 PM
To: Lorensen, William E (Research)
Cc: William A. Hoffman; Luis Ibanez; Insight Developers List
Subject: Re: [Insight-developers] RE: Complex vs f2c.h,"real" symbol
conflicts in gcc 2.95


Lorensen, William E (Research) wrote:
> If we edit all of that code, the next time we update from vxl, we'll have to re-edit?

Correct :(

but we could just write a shell script for the upgrade person to use.

-Brad

> -----Original Message-----
> From: Brad King [mailto:brad.king at kitware.com]
> Sent: Tuesday, June 07, 2005 1:26 PM
> To: Lorensen, William E (Research)
> Cc: William A. Hoffman; Luis Ibanez; Insight Developers List
> Subject: Re: [Insight-developers] RE: Complex vs f2c.h,"real" symbol
> conflicts in gcc 2.95
> 
> 
> Lorensen, William E (Research) wrote:
> 
>>Simple solution:
>>
>>f2c.h is only included in netlib files and some FEM files.
>>
>>I added :
>>#define real f2cReal
>>#define complex f2cComplex
>>
>>to f2c.h
>>
>>and everything is building. I got through vnl and FEM anyway. I'll keep building. This works because the FEM guys include f2c.h last. The netlib guys don't include any conflicting stuff anyway.
>>
>>I probably should do the #define's only for gcc2.95?
> 
> 
> If any code ever wants to use both complex and f2c then we have to also 
> #undef real at the right place.  A variant of solution #3 is to just 
> rename real to REAL in f2c.  Since REAL is just as valid as real in 
> fortran, it would not reduce the "readability" of the f2c converted 
> code.  It would also be a very easy search-and-replace change.
> 
> -Brad



More information about the Insight-developers mailing list