quiet / libcorrect

C library for Convolutional codes and Reed-Solomon
BSD 3-Clause "New" or "Revised" License
362 stars 95 forks source link

Using with C++ #19

Open Hiffi opened 6 years ago

Hiffi commented 6 years ago

It seems, that the header of the Library is missing the extern "C" wrapper. It would be easier to use in C++ programs! I edited it for me by hand and it works just fine.

Add (at the beginning of the correct-header):

#ifdef __cplusplus
extern "C" {
#endif

Add (at the end of the correct-header):

#ifdef __cplusplus
}
#endif
JayKickliter commented 5 years ago

I just ran into this well. My GNU Radio code using this broke. I did the normal thing when including c headers:

extern "C" {
#include <correct.h>
}