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

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Mon Jun 24, 2024 5:58 pm

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...

aliarifat794
Posts: 200
Joined: Sun Jun 23, 2024 6:18 pm

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

Postby aliarifat794 » Mon Jun 24, 2024 7:00 pm

Kindly check your code. Maybe there has been a problem in naming a variable.

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Sun Jul 07, 2024 2:18 pm

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Mon Jul 08, 2024 3:34 am

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.

Who is online

Users browsing this forum: No registered users and 4 guests