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 Complier Error For Boolean Function Pointer (Read 847 times)
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Complier Error For Boolean Function Pointer
Jan 29th, 2021 at 10:24am
Print Post  
I've spent hours stripping down the code to understand exactly what isn't working, even re-installed both environments (VSmicro and Arduino env). I have come to a roadblock and have to reach out to you. See the code below and the screenshot of the build.

  • If I take the code as is with the "bool" func pointer on line 17, and compile this in the arduino editor, this also compiles. (as well as in the Visual C++ compiler)
  • If I uncomment line 16 and comment line 17 the project builds.


Code
Select All
// Test program
bool (*f)(char[], int&) = nullptr;

void setup()
{
    // Initialize serial port
    Serial.begin(9600);
    Serial.println("Started Arduino!");
}

void loop()
{

}

//void ReceiveJSONCommand(int (*ff)(char[], int&))
void ReceiveJSONCommand(bool (*ABC)(char[], int&))
{
    //
}
 

« Last Edit: Jan 29th, 2021 at 10:24am by Simon@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: Complier Error For Boolean Function Pointer
Reply #1 - Jan 29th, 2021 at 3:46pm
Print Post  
We have released a new version to the forum which will resolve the issue (21.01.06.2), at the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint