|
From: Hans-Bernhard B. <br...@ph...> - 2005-05-08 16:47:36
|
Per Persson wrote: > I've had a report that gnuplot won't compile on OS X 10.4 and gcc 4.0 > because of a conflict with a static char array "Class" in gplt_x11.c and > the Objective-C type "Class". It has not been a problem before so it > seems gcc 4 is pickier about this than gcc 3.x. Or maybe it's plain wrong about it. Stranger bugs have crept into little-used corners of GCC before. > When detecting Mac OS X and libaquaterm "-ObjC" is added to CFLAGS > (apple.m4), and every file is compiled as ObjC although only > aquaterm.trm needs the "-ObjC" flag. > As I see it, there are two ways to fix this: > 1) Change the name "Class" in gplt_x11.c > 2) Increase granularity in buildsystem to only compile aquaterm.trm (or > term.c) with "-ObjC" I'm not convinced that (2) can work. -ObjC effectively switches to a different language, with possibly different calling conventions and name mangling rules. I wouldn't be surprised in any way if this broke the link completely. |