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


Posts: 3
Location: Germany
Joined: Dec 15th, 2020
undefined references
Dec 15th, 2020 at 2:48pm
Print Post  
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: 2145
Joined: Feb 13th, 2019
Re: undefined references
Reply #1 - Dec 15th, 2020 at 3:12pm
Print Post  
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
Location: Germany
Joined: Dec 15th, 2020
Re: undefined references
Reply #2 - Dec 16th, 2020 at 7:07am
Print Post  
project is sent. Thank you!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: undefined references
Reply #3 - Dec 16th, 2020 at 2:55pm
Print Post  
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
Select All
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
Location: Germany
Joined: Dec 15th, 2020
Re: undefined references
Reply #4 - Dec 19th, 2020 at 9:30am
Print Post  
Thank you very much! Now with the knowledge I have come further
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint