From: Bobane on
Having the same problem. I understand that complex number support in C is only available in C99 compliant compilers, and that MVSC is NOT C99 compliant. Ofcourse this is available in the C++ libraries. However, Lcc (which is the default C compiler shipped with Matlab) claims to be C99 compliant, but also throws up this error (can't open 'complex.h'). Have tried various variants (#include <complex.h>, #include "complex.h",# include <complex>, ...) to no avail. Can anyone else shed any light on this?

Bobane

"Nick Snels" <snels(a)yahoo.com> wrote in message <gugmtp$26l$1(a)fred.mathworks.com>...
> Hi,
>
> I'm trying to compile C code in matlab 7.7.0 R2008b on a Vista 64 bit system using Visual Studio C++ 2008 Express edition. And I'm getting the error:
>
> C:\PROGRA~1\MATLAB\R2008B\TOOLBOX\PACKAG~1\EMDS\SRC\cemdc.c(19) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory
>
> If I go looking for this file in my Visual Studio include folder I can not find it. I only see a file named complex. I have already tried to rename it too complex.h, but than I get a bunch of cmath errors like the ones below:
>
> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\cmath(21) : error C2143: syntax error : missing '{' before ':'
> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\cmath(21) : error C2059: syntax error : ':'
>
> Any ideas how I can fix this and get this code to work? Thanks.
>
> Kind regards,
>
> Nick