Building C/C++ modules with micropython-wrap #16260
Replies: 2 comments 8 replies
-
If you are including header files that define functions or variables, ensure that they are properly guarded to avoid multiple inclusions. #endif // MY_HEADER_H |
Beta Was this translation helpful? Give feedback.
-
Maybe they are duplicated? Build with V=1, carefully inspect the compilation phase that this file is really compiled only once, and check the linking phase that the output doesn't contain the .o twice. Or something like that.
This isn't being used correctly here. It might work but it's confusing. This file is a .cpp, right, so contains C++ code so there's no way it can be compiled as C, hence the |
Beta Was this translation helpful? Give feedback.
-
Hello folks,
i've been playing with micropython-wrap for some days now and am finally far enough that it compiles but it doesnt link. My example is based on the usercppmodule example micropython provides. Now i am getting multiple definition linker errors. In fact all functions inside my cpp files are duplicated. Does anyone has an idea how to troubleshoot or fix it?
Kind Regards Tobi
Beta Was this translation helpful? Give feedback.
All reactions