Compile error: function name collisions between port.h and math.h?

Anders F Björklund afb at algonet.se
Thu Apr 5 01:37:33 PDT 2007


mpb wrote:

> Instead of undefining macros, I simply changed expression.c to include port.h
> *before* math.h.  This allowed me to compile expression.c to expression.dmd.o.

That fixes it temporarily, until something else includes port.h too :-P

BTW:
Had a similar matter in Code::Blocks recently, where someone did an enum
for different platforms: windows, linux, macosx (and so on and so forth)
It's just that "linux" is a predefined macro, so the code broke there...
Eventually it was worked around by adding -Ulinux to the CPPFLAGS. Ouch.

--anders


More information about the D.gnu mailing list