I know very little about VS, and was surprised when my linux code did not compile on windows. The problem seams from the lack of <complex.h>
in VS. My question is this: do people re-implement in their Windows applications, or is there a public domain version.
views:
797answers:
4
+2
A:
<complex.h>
is a new feature of ISO/IEC 9899:1999 and Visual Studio (at least up to 2008) only supports ISO/IEC 9899:1990 with some extensions, so complex.h
isn't supported.
Charles Bailey
2009-07-25 14:41:49
A:
If you have the option of using C++ instead of C, you can use the complex
header. Visual C++ supports C89, but not C99, where complex.h
is defined.
If C++ is not an option, you can either use another compiler (there are Windows ports of GCC available, for example), or try to find a third-party implementation.
jalf
2009-07-25 15:57:48
c++ is not an option, and neither is compiling via gcc
adk
2009-07-26 00:22:42
A:
since C++ is not an option, and neither is GCC, can't you just... Download the header, and include it into your project yourself: #include"complex.h"
? You could download a minimal version of MinGW and just copy the header file over.
Carson Myers
2009-07-26 07:02:30
this answer is wrong: you cannot just use complex.h to get complex support.If you can't use gcc and can't use C++, the only solution is to drop support for C99 complex.
David Cournapeau
2009-11-04 07:57:06
Well, I wasn't sure when I posted this answer, it was just a thought that I didn't see elsewhere. Can you be specific as to why it can't be done? Or edit the answer?
Carson Myers
2009-11-05 02:49:24