[Insight-developers] RE: Complex vs f2c.h,
"real" symbol conflicts in gcc 2.95
Brad King
brad.king at kitware.com
Tue Jun 7 13:26:15 EDT 2005
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