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 reference newbie error (Read 2750 times)
Abbott HMG
Junior Member
**
Offline


Posts: 56
Location: Bedford, NY, USA
Joined: May 10th, 2019
undefined reference newbie error
Dec 18th, 2019 at 3:20am
Print Post  
This is probably a real newbie mistake, but I keep getting the following errors on the attached test compile (that does nothing):
undefined reference to TimedInterruptsClass::interruptInfos
undefined reference to TimedInterruptsClass::infoCount                  
Someone please set me straight
Abbott
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: undefined reference newbie error
Reply #1 - Dec 18th, 2019 at 11:42am
Print Post  
One point of note is that you should rename TimedInterrupts.cpp to something else.

When compiling Arduino all of the .ino files in the project are written to a file in a temp folder called projectName.cpp.

In your case that will be TimedInterrupts.cpp which will cause issues for you.

  
Back to top
WWW  
IP Logged
 
Abbott HMG
Junior Member
**
Offline


Posts: 56
Location: Bedford, NY, USA
Joined: May 10th, 2019
Re: undefined reference newbie error
Reply #2 - Dec 18th, 2019 at 5:11pm
Print Post  
Thanks
The project name and folder are TimedInterruptsTest.
I don't understand what I'm doing that causes the compiler to throw those errors. The project it coemes from has 2 classes, most more complex than this and they compile clean.
Abbott
« Last Edit: Dec 18th, 2019 at 5:13pm by Abbott HMG »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: undefined reference newbie error
Reply #3 - Dec 18th, 2019 at 5:24pm
Print Post  
ah sorry didn't see the .ino and project name end with test. Code structure okay so I suggest asking for assistance on the arduino.cc forum. That's the place for code help, that or stackoverflow.
  
Back to top
WWW  
IP Logged
 
Abbott HMG
Junior Member
**
Offline


Posts: 56
Location: Bedford, NY, USA
Joined: May 10th, 2019
Re: undefined reference newbie error
Reply #4 - Dec 18th, 2019 at 6:04pm
Print Post  
Thanks ... will do
  
Back to top
 
IP Logged
 
Abbott HMG
Junior Member
**
Offline


Posts: 56
Location: Bedford, NY, USA
Joined: May 10th, 2019
Re: undefined reference newbie error
Reply #5 - Dec 19th, 2019 at 8:28pm
Print Post  
Thanks. I worked it out myself. I had 2 static variables defined in the header, instead of the .cpp.
I new it was a newbie thing.
Abbott
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: undefined reference newbie error
Reply #6 - Dec 19th, 2019 at 8:31pm
Print Post  
Great, thanks for the update.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint