Windows 7; Arduino IDE 1.6.9
1.0.0.21, Arduino/Genuino Mega or Mega 2560
正在加载配置...
正在初始化包...
正在准备开发板...
正在验证、上传...
C:\Users\Administrator\Documents\Arduino\libraries\Timer1\TimerOne.cpp:23:25: error: 'long unsigned int TimerOne::timer1_microseconds' is not a static member of 'class TimerOne'
unsigned long TimerOne::timer1_microseconds = 0;
^
exit status 1
为开发板 Arduino/Genuino Mega or Mega 2560 编译时出错。
5:35 am
March 12, 2015
It looks like you may have modified the TimerOne library as your error is stating there is no member "timer1_microseconds". Looking through the TimerOne library that ships with the Compiler, this member does not exist so you need to revert your library. Any custom modifications you have made are outside the scope of support.
4:56 pm
January 28, 2017
Somewhat related question.. I was having the same issue, and after looking at TimerOne.h, I found that static unsigned long timer1_microseconds was indeed missing within the TimerOne class. I added it back in, but when I compile from Labview, something is reverting the changes that I made in TimerOne.h . In order to solve the problem, I have to mark the file as read only. I had a similar problem with the I2C LCD example where I had to edit the library then mark as read only, otherwise my changes were being reverted when compiling in Labview. What am I missing?
8:50 pm
March 12, 2015
The TimerOne library should not have any member timer1_microseconds so I am not sure why you are finding you need to include it. In general, the library is installed automatically with the Arduino Compatible Compiler for LabVIEW in the following directory:
\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\Aledyne-TSXperts\Arduino Compatible Compiler for LabVIEW\Arduino Libraries
From there, on compilation of a VI, it is copied automatically by the Compiler to the Arduino Libraries directory. So if you need to make a change to one of the included libraries, you need to make the change to the library at the above location.
4:06 am
January 28, 2017
Ok that makes sense about the libraries being copied, but then I guess I don't understand the solution to the original problem. In order to solve it, I added static unsigned long timer1_microseconds to TimerOne.h, marked as read only so the library copy would have failed, and that fixed the issue. However, now that I know what's happening with the copy, I removed the read only to allow the copy and everything still works fine, so I'm not really sure what happened in the first place. Anyhow, thanks for the help, now I know the appropriate place to mess with the library files in the event of other errors.
6
1 Guest(s)