Page 1 of 1

why do I do i get that message? Is the preprocessor entitled to substitute in libraries !

Posted: Mon Jun 24, 2024 5:58 pm
by rin67630
Hi newly I get that compiler error with Arduino IDE 2.0:

Code: Select all

In file included from D:\Activities\3_Maker\ESP_VictronDrok_on_Steroids_V05.2024\Config_Victron8266.h:36,
                 from D:\Activities\3_Maker\ESP_VictronDrok_on_Steroids_V05.2024\a_Libs_Vars.ino:7:
d:\Activities\3_Maker\libraries\Victron_on_Steroids_HAL_Files/MPPT_100_20.h:33:13: error: expected unqualified-id before numeric constant
   33 |   #define V 3
      |             ^
C:\Users\MiFi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/sdk/include/bearssl/bearssl_rand.h:205:16: note: in expansion of macro 'V'
  205 |  unsigned char V[64];
      |     
I am surprised that the Macro preprocessor of Arduino IDE tries to substitute in libraries too !
Is that normal behavior?

I did not include BearSSL, is that a dependency of another library?
How to find out which one, so I can try to set back an older version.

Thank you...

Re: why do I do i get that message? Is the preprocessor entitled to substitute in libraries !

Posted: Mon Jun 24, 2024 7:00 pm
by aliarifat794
Kindly check your code. Maybe there has been a problem in naming a variable.

Re: why do I do i get that message? Is the preprocessor entitled to substitute in libraries !

Posted: Sun Jul 07, 2024 2:18 pm
by rin67630
aliarifat794 wrote:
Mon Jun 24, 2024 7:00 pm
Kindly check your code. Maybe there has been a problem in naming a variable.
It is not my code.
I have to use the preprocessor define "V" on a given library, and the "bearssl" library (don't know who uses it) uses it as well.

Re: why do I do i get that message? Is the preprocessor entitled to substitute in libraries !

Posted: Mon Jul 08, 2024 3:34 am
by ESP_Sprite
It's likely an include that is included by some other file that you *do* include. Most practical workaround is to move your '#define V 3' to under your #include-s.