开发者

Problem to compile a C-program by GCC in the latest Cygwin due to tgmath.h and complex.h

开发者 https://www.devze.com 2023-01-06 17:26 出处:网络
I have successfully compiled a C-program with GCC in Mac OS X and Linux, but have got the following error message in Cygwin 1.7.5:

I have successfully compiled a C-program with GCC in Mac OS X and Linux, but have got the following error message in Cygwin 1.7.5:

/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/t开发者_JAVA百科gmath.h:38:21: error: complex.h: No 
such file or directory

I have noticed that several guys reported that tgmath.h has problems in Cygwin. However, due to the lack of knowledge I cannot understand if those issues have been already fixed or if they are related to the error I get. See, for example:

  1. http://cygwin.com/ml/libc-alpha/1999-12/msg00021.html
  2. http://cygwin.com/ml/libc-hacker/2007-07/msg00012.html

As an experiment, my colleagues have replaced include <tgmath.h> with include <math.h>. However, the code threw an exception.

Could you explain me what can be wrong in Cygwin's tgmath.h or complex.h, and how I can get through it?


This could completely wrong, but make sure you're compiling with -std=c99, complex.h is part of the C99 standard.


Unfortunately the complex.h stuff hasn't been implemented for Cygwin (or more precisely, for newlib, which is the C library used by Cygwin).

http://cygwin.com/cygwin-api/std-notimpl.html

0

精彩评论

暂无评论...
验证码 换一张
取 消