You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use this library from C++ and ended up needing to add an extern "C" wrapper around the method headers in pyin.h to make it callable by C++. These wrappers could be built into pyin.h to make things easier on the next C++ coder who uses this library:
#ifdef __cplusplus
extern "C" {
#endif
// The method headers that need to be wrapped.
pyin_config pyin_init(int nhop);
int pyin_trange(int nq, FP_TYPE fmin, FP_TYPE fmax);
FP_TYPE* pyin_analyze(pyin_config param, FP_TYPE* x, int nx, FP_TYPE fs, int* nfrm);
I tried to use this library from C++ and ended up needing to add an extern "C" wrapper around the method headers in pyin.h to make it callable by C++. These wrappers could be built into pyin.h to make things easier on the next C++ coder who uses this library:
#ifdef __cplusplus
extern "C" {
#endif
// The method headers that need to be wrapped.
pyin_config pyin_init(int nhop);
int pyin_trange(int nq, FP_TYPE fmin, FP_TYPE fmax);
FP_TYPE* pyin_analyze(pyin_config param, FP_TYPE* x, int nx, FP_TYPE fs, int* nfrm);
#ifdef __cplusplus
}
#endif
See https://stackoverflow.com/questions/1041866/what-is-the-effect-of-extern-c-in-c for more context on this issue.
The text was updated successfully, but these errors were encountered: