I am having an issue adding #include <stdarg.h> in one of the modules of my code.
I can add #include <stdarg.h> in “basic” Setup / Loop sketch and use va_list variable - no problem.
Not so in my real code. After looking into one of may copies of stdarg.h on my PC I found that va_list is defined using few cascaded preprocessor directives.
So I udefined the _VA_LIST_DEFINED and managed to compile part of the offended code.
The “problem” is this particular copy of stdarg.h wants to have _WIN32 defined. No sweat, just defined and undefined it after the va_list was declared. Hack away.
I would like clear this hack and need help finding out how to determine which stdarg.h is used by Arduino compiler when #include <stdarg.h> is used .
I did not find it in compiler verbose output and could use some hint how to go about it without analyzing each and every one of the copies of stdarg.h on my PC.
Here is the working hack
#pragma message ("stdarg BUG ")
#include <C:\Program Files\Microsoft Visual Studio\VC98\Include\stdarg.h> // TEMP MN BUG
//#include <stdarg.h> won’t do - need the file location in use by Arduino
Don’t ask to put code in quotes - tool tips don’t work to tell me which icon to use.
Do not’t ask to include ALL my code and "what are you building ".
And if you do not understand the question / problem … just move on.