Property to get the temporary build folder name


I have a library that has dependencies on functions defined in a sketch that uses that library. From the library:


void foo()

The a_function() is defined inside the sketch:


void a_function()

However, the linker cannot find the symbol a_function() because it’s inside the temporary folder, so my question is: What is the property (those used in the platform.txt file) that I can use to get the location of the temporary folder?

By property I mean, for example:

I didn’t find anything related to my problem here: Platform specification - Arduino CLI

Thank you!

The property is build.path
The preprocessed sketch code is under the sketch subfolder.

But there is a much better way to accomplish this than modifying platform.txt. You can pass a pointer to the function from the sketch to the library via a function argument (e.g., a “callback”).

1 Like

Thank you for your prompt reply!

Unfortunately I cannot modify neither the library nor the foo() function signature. I’ll try with the advece you gave me: build.path


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.