Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic VS2022 enum error (Read 747 times)
Henk Levels
Junior Member
**
Offline


Posts: 81
Joined: Sep 28th, 2015
VS2022 enum error
May 29th, 2024 at 7:48am
Print Post  
Hi,
Why do I get this error below in VS2022 with enums. I have an older project where this code does work also in VS2022. Thanks
/*
    Name:       Test_Enums.ino
    Created:      29-5-2024 09:38:30
    Author:     LAPT-KANT-ES1\HenkLevels
*/

enum SWmodesType { eSW_Normal, eSW_Setup, eSW_Change };
SWmodesType SWmode = eSW_Normal;


void setup()
{
    SWmode = eSW_Setup;
}

void loop()
{

}


Severity      Code      Description      Project      File      Line      Suppression State      Details
Error (active)      E0144      a value of type "SWmodesType" cannot be used to initialize an entity of type "SWmodesType"      Test_Enums      C:\Arduino-Sketches\Test_Enums\Test_Enums\Test_Enums.ino      8            
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: VS2022 enum error
Reply #1 - May 29th, 2024 at 7:59am
Print Post  
Thanks for the report.

Can you attach the build output with the settings enabled as shown at the top of this page?

Also please confirm if you are using the ARM or ARM64 Solution Configuration.
  
Back to top
IP Logged
 
Henk Levels
Junior Member
**
Offline


Posts: 81
Joined: Sep 28th, 2015
Re: VS2022 enum error
Reply #2 - May 29th, 2024 at 12:18pm
Print Post  
Hi Thanks Solved!! Changing to Arm instead of Arm64 did the Job
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint