相关疑难解决方法(0)

c++ 和 <complex.h> 与 <complex> 在单独的文件中

笔记:

我正在使用 Apple LLVM 6.0 (clang-600.0.56)(基于 LLVM 3.5svn)在 OSX 上编译

具体来说,我正在尝试从 LibIIR 编译一个单一的源代码,LibIIR 是一个由 Laurence Withers在这里维护的过滤器库。

我已经看过这个答案在这里了有关同时使用<complex>,并<complex.h>在同一个文件。


设置:

我有一个iir.h像这样的文件:

#include <complex.h>

#ifdef __cplusplus
extern "C" {
#endif

...
Run Code Online (Sandbox Code Playgroud)

我有 C++ 源文件libiir++.cpp和头文件,iir++.h就像这样:

/*** libiir++.cpp ***/
// we need to include "iir.h" first, as it pulls in <complex.h>, which we need
// to take effect before "iir++.h" pulls in <complex>
#include "iir.h"

// now remove the …
Run Code Online (Sandbox Code Playgroud)

c c++ complex-numbers

2
推荐指数
1
解决办法
1767
查看次数

标签 统计

c ×1

c++ ×1

complex-numbers ×1