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
undefined references (Read 383 times)
neuling
Newbies
*
Offline



Posts: 3
Germany
undefined references
Dec 15th, 2020 at 2:48pm
 
Hi
I am currently trying to refactor my working program. Now it should be properly divided by the classes. But I am now wondering about the compiler error messages.
There is, as it should be, only one main .ino . Compiler gives something like this about different variables:
"Controller.ino:30: undefined reference to bRT_FallingEdgeDetected".
But all these variables are declared/definded in #included header files before. Visual Studio Intellisense does not complain either.
Compiler output is attached in separate email to you
Thanks in advance for your help!
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 980
Re: undefined references
Reply #1 - Dec 15th, 2020 at 3:12pm
 
Would it be possible to ZIP the whole project and send this to us via email?
(we do not share the code, and will remove it once the problem is resolved)
Back to top
 
 
IP Logged
 
neuling
Newbies
*
Offline



Posts: 3
Germany
Re: undefined references
Reply #2 - Dec 16th, 2020 at 7:07am
 
project is sent. Thank you!
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 980
Re: undefined references
Reply #3 - Dec 16th, 2020 at 2:55pm
 
Thanks for the project, and this results in the same errors in the Arduino IDE as well, so not a problem directly linked to vMicro.

If you add the below two lines of code to the Utilities524_33.cpp, below the includes, it will compile as expected.
Code:
const BusPuls TimesDefinition;
volatile boolean bRT_FallingEdgeDetected; 



The extern declaration in the *.h, makes it global, but needs a non-extern declaration in "a" source file to actually define the variable.
Back to top
 
 
IP Logged
 
neuling
Newbies
*
Offline



Posts: 3
Germany
Re: undefined references
Reply #4 - Dec 19th, 2020 at 9:30am
 
Thank you very much! Now with the knowledge I have come further
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print