VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> compiling in VM vs. Arduino IDE
https://www.visualmicro.com/forums/YaBB.pl?num=1601432870

Message started by perigalacticon on Sep 30th, 2020 at 2:27am

Title: compiling in VM vs. Arduino IDE
Post by perigalacticon on Sep 30th, 2020 at 2:27am
I have a project that has been compiling in Arduino IDE for a long time.  I just tried to import it into VM using VS, and it has compiling errors that haven't happened in the Arduino IDE.

Should there be any difference in the compilation compared to Arduino IDE?

It can't seem to find functions that I had defined in additional Arduino tabs / .ino files.

Thanks.

Title: Re: compiling in VM vs. Arduino IDE
Post by Simon@Visual Micro on Sep 30th, 2020 at 10:22am
There should be no difference between Visual Micro in the Release Build Configuration and the Arduino IDE.

Can you confirm all INO files are in the project in Visual Micro (visible in the Solution Explorer window)?

Title: Re: compiling in VM vs. Arduino IDE
Post by perigalacticon on Sep 30th, 2020 at 6:12pm
I found I had to include function prototypes for some functions.

I had a function pointer array defined in my imported .ino 'defines' tab (before Setup()).


Code (c++):
void (*mode_fn_array[])() =
{function1, function2, function3, function4, function5};


The functions themselves were defined on a later tab.

It couldn't find the functions until I put in function prototypes for them before the pointer array definition.  It found all my other functions though.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.