views:

634

answers:

2

After some searching I've found that Microsoft Visual Studio does not provide the "complex.h" header file, but I have some C code that unfortunately uses it. I've tried using <complex> and compiling as C++ code; this requires changing

complex

to

_complex

I don't even know what I would need to change

long complex

to. Any ideas how I can get around this?

A: 

Have you tried this link?


If you can't use third-party libraries, then I think you're going to be compelled to re-implement complex functionality yourself. The good news is that most complex math is actually really simple to write, unless you need some fairly advanced features.

abelenky
This is commercial software, so using third-party libraries is not the best option due to licensing issues.
A: 

What are you expecting to be in complex.h? It is not, as far as I know, a standard C header file. It is however a pre-standard C++ header, but trying to use it with C code will obviously not work.

anon
complex.h is a part of the C99 standard. It defines types like complex and double complex as well as functions that operate on complex types like cabs.