Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
compiling in VM vs. Arduino IDE (Read 93 times)
perigalacticon
Junior Member
**
Offline



Posts: 54
detroit area
compiling in VM vs. Arduino IDE
Sep 30th, 2020 at 3: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.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online



Posts: 537
Re: compiling in VM vs. Arduino IDE
Reply #1 - Sep 30th, 2020 at 11: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)?
Back to top
 
 
IP Logged
 
perigalacticon
Junior Member
**
Offline



Posts: 54
detroit area
Re: compiling in VM vs. Arduino IDE
Reply #2 - Sep 30th, 2020 at 7: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.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print