Hello,
consider such a code in a file :
#ifdef __OPTION__
#include <lib1.h>
#else
#include <lib2.h>
#endif
lib1 and lib2 are 2 variants of the same code, with the same ctors and funcs, same parameters, same static local variables etc.
The precompiler option is not taken into account, and both libraries get compiled/linked, generating an error for each and every function (multiple definition)
This can be seen in the Release/Debug subfolders.
The problem only occurs with VisualMicro, the code always compiles fine in Arduino IDE. I use Visual Studio 2017 + VisualMicro 1.1908.5
Workaround : commenting out the offending #includes solves the problem, but it is an uggly fix !
I didn't see an option related to this behaviour.
When generating the makefile, VisualMicro should not include the preprocessor-excluded headers and related sources (I don't know where lives the makefile, so I didn't investigate further...)