Compiler errors with #include directives

I was going to file an issue on github but I rather ask here first, also because I cannot give concise code examples.
I have written some objects that use .h and .cpp files which work fine on the Axoloti, where I actually added both (.h and .cpp) to the “include” section of the object definition.

But on the akso I get lots of “redefinition of” errors for every function. I could get rid of that by removing the .cpp file from the “include” section but then I conversely get “undefined reference to” instead.

Then I looked at the clds object and noticed that it includes a “axoloti_mi.h” in where it reads “Temporary solution for MI deps in patches”.

I admit that I am not a C++ guru, I only have been able to fiddle my way in the past when it comes to build processes.

Maybe if I understood the nature of that MI-workaround, I could do the same for my objects?
I think I need to make it link my cpp files somehow, but how?

Hey @ivofx. There are a couple of subtle things happening here that are a little bit difficult to articulate without a concrete example. Can you point me to an example of one of your objects that fails to compile? I’ll try to give you a workaround to use until the general fix is available in the next patch release.

1 Like

Will do that as soon as possible, thanks in advance @nsm

Update: I won’t be able to get to this until early November.

Hey @nsm , the first problem was caused by me not adding all files to the include section of the object afterall, so that is resolved :slight_smile:

I came across a related problem and wrote up the repro-steps + code as a github issue. Maybe it is simply me doing something wrong:

As written on github, I think I resolved the issue.

1 Like