extern "C"
{
#endif
#include <stdint.h>
#include <limits.h>
#include "attributes.h"
}
#endif
I added extern "C" { }
Then i got the C2059 string
error
So i tried to use #endif
, now i have another 4 errors.
Error 1 error C2059: syntax error : 'string' d:\c-sharp\c++
compiling\consoleapplication7\consoleapplication7\libavutil\rational.h 31 1
ConsoleApplication7
How can i fix this string error ?
At a guess, are you including this code from a C source file?
extern "C" {
guards are only required (or understood) by C++. You can omit them from a C file, should include them in a C++ file and should guard them with a __cplusplus
ifdef in a header file.
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <limits.h>
#include "attributes.h"
#ifdef __cplusplus
}
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With