Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <complex.h>
  2.  
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. ...
  8.  
  9. /*** libiir++.cpp ***/
  10. // we need to include "iir.h" first, as it pulls in <complex.h>, which we need
  11. // to take effect before "iir++.h" pulls in <complex>
  12. #include "iir.h"
  13.  
  14. // now remove the preprocessor definition of complex to _Complex, which is fine
  15. // for the C header but not good for the C++ header
  16. #undef complex
  17.  
  18. #include "iir++.h"
  19.  
  20. namespace IIR {
  21.  
  22. ...
  23.  
  24. /*** iir++.h ***/
  25. #include <complex>
  26.  
  27. namespace IIR {
  28.  
  29. ...
  30.  
  31. ./iir.h:570:15: error: expected ';' after top level declarator
  32. double complex iir_response_c(const struct iir_coeff_t* coeff, double freq);
  33. ^
  34. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement