We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At this point, the vultc generates a mix of C and C++. C doesn't support references, therefore on my platform (RP2040) the compiler complains:
n file included from /home/syso/dev/pico-project-generator/i2s-codec-demo/i2s-codec-demo.c:11: /home/syso/dev/pico-project-generator/i2s-codec-demo/vult.h:16:59: error: expected ';', ',' or ')' before '&' token 16 | static_inline void Util__ctx_type_0_init(Util__ctx_type_0 &_output_){ | ^ /home/syso/dev/pico-project-generator/i2s-codec-demo/vult.h:23:52: error: expected ';', ',' or ')' before '&' token 23 | static_inline void Util_edge_init(Util__ctx_type_0 &_output_){ | ^ /home/syso/dev/pico-project-generator/i2s-codec-demo/vult.h:28:50: error: expected ';', ',' or ')' before '&' token 28 | static_inline uint8_t Util_edge(Util__ctx_type_0 &_ctx, uint8_t x){ | ^ ...
The text was updated successfully, but these errors were encountered:
The code generated by the compiler is C++. If you want to call if from C it is necessary to make wrappers for the C++ functions. Take a look at https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp
Basically, you need to create an extern "C" function that takes a pointer and calls the corresponding C++ function passing the reference.
extern "C"
I dropped the support for pure C code because it is easier to generate C++.
Sorry, something went wrong.
No branches or pull requests
At this point, the vultc generates a mix of C and C++. C doesn't support references, therefore on my platform (RP2040) the compiler complains:
The text was updated successfully, but these errors were encountered: