HI all, This is off-topic, as it has nothing to do with NumPy, but this is the only mailing list I'm on that has folks that might be able to help. I'm trying to compile something that uses clapack, and thus f2clib. I installed f2c on my Gentoo box, and it compiled and installed fine, but when I try to compile the app in question, I get errors in f2c.h: g++ -c -o Utilities.o `/usr/local/bin/wx-config --inplace --cxxflags` Utilities.cpp In file included from Utilities.cpp:6: /usr/include/f2c.h:16: error: parse error before `,' token /usr/include/f2c.h:16: error: semicolon missing after struct declaration /usr/include/f2c.h:16: error: abstract declarator `<anonymous struct>' used as declaration /usr/include/f2c.h:16: error: namespace-scope anonymous aggregates must be static /usr/include/f2c.h:132: error: 'real' is used as a type, but is not defined as a type. /usr/include/f2c.h:134: error: 'complex' is used as a type, but is not defined as a type. /usr/include/f2c.h:174: error: `R_fp' was not declared in this scope /usr/include/f2c.h:174: error: typedef `real' is initialized (use __typeof__ instead) /usr/include/f2c.h:174: error: conflicting types for `typedef int (real)(...)' /usr/include/f2c.h:14: error: previous declaration as `typedef float real' Jsut in case, I also tried with the ftc.h that is included with Numeric24, which compiled just fine (maybe it's now on topic?) I got the same errors. Is this a compiler flag issue (maybe for old style C) or something? I'm clueless. thanks for any helpful hints. As you can tell, I know next to nothing about C/C++ -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
Chris Barker wrote:
HI all,
This is off-topic, as it has nothing to do with NumPy, but this is the only mailing list I'm on that has folks that might be able to help.
I'm trying to compile something that uses clapack, and thus f2clib. I installed f2c on my Gentoo box, and it compiled and installed fine, but when I try to compile the app in question, I get errors in f2c.h:
g++ -c -o Utilities.o `/usr/local/bin/wx-config --inplace --cxxflags` Utilities.cpp In file included from Utilities.cpp:6: /usr/include/f2c.h:16: error: parse error before `,' token /usr/include/f2c.h:16: error: semicolon missing after struct declaration
I'm willing to bet that it's choking on line 15: typedef struct { real r, i; } complex; "complex" is already taken, I believe. At least vim is highlighting it as if it were a reserved type. -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Thanks, Robert. Robert Kern wrote:
I'm willing to bet that it's choking on line 15:
typedef struct { real r, i; } complex;
"complex" is already taken, I believe. At least vim is highlighting it as if it were a reserved type.
What's confusing is that this same header works fine with Numeric, and this same code has compiled fine (though I don't know if the header is exactly the same) under Windows Visual C++. Of course, I've found that VC++ lets all sorts of sloppiness through that gcc catches. I've just got a hint, however. C++ has a complex type, c doesn't, and I'm compiling this with g++. Numeric is all C, so it wouldn't have that problem. I'll plug away, but if anyone has a hint on how I can use f2clib in a C++ app with gcc, I'd love to hear it. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (2)
-
Chris Barker
-
Robert Kern