Hi,
First code problem post, I’m stumped. Sorry if I’m providing the information in the wrong way!
I’m getting an odd error when I verify my code. I made some changes and now it won’t verify. I went back to a backup copy that did verify, and that won’t either! What’s weird is this code used to work! If I’ve messed something up then I just can’t see what it is. Can anyone help?
It seems to be complaining about the start of the file, which looks like this:
// This #include statement was automatically added by the Particle IDE.
#include "RelayShield/RelayShield.h"
#include "application.h"
// Create an instance of the RelayShield library, so we have something to talk to
RelayShield myRelays;
To me, the log seems to be referring to the library file, which is crazy! So I’m obviously misreading the situation.
The verification log is:
32+0 records in
32+0 records out
32 bytes (32 B) copied, 7.3701e-05 s, 434 kB/s
4+0 records in
4+0 records out
4 bytes (4 B) copied, 0.0433473 s, 0.1 kB/s
In file included from garagedoor.cpp:2:0:
RelayShield/RelayShield.h:26:8: warning: extra tokens at end of #endif directive [enabled by default]
#endif RelayShield_h
^
In file included from RelayShield/RelayShield.cpp:1:0:
RelayShield/RelayShield.h:26:8: warning: extra tokens at end of #endif directive [enabled by default]
#endif RelayShield_h
^
/tmp/ccjyUEdU.ltrans0.ltrans.o: In function `Timer::invoke_timer(void*) [clone .local.406]':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:119: undefined reference to `os_timer_get_id'
/tmp/ccjyUEdU.ltrans7.ltrans.o: In function `_stop':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:71: undefined reference to `os_timer_change'
/tmp/ccjyUEdU.ltrans7.ltrans.o: In function `_reset':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:76: undefined reference to `os_timer_change'
/tmp/ccjyUEdU.ltrans8.ltrans.o: In function `isActive':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:61: undefined reference to `os_timer_is_active'
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:61: undefined reference to `os_timer_is_active'
/tmp/ccjyUEdU.ltrans18.ltrans.o: In function `dispose':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:92: undefined reference to `os_timer_destroy'
/tmp/ccjyUEdU.ltrans23.ltrans.o: In function `__base_ctor ':
/spark/compile_service/shared/workspace/0_core_0.6.0_102_1/firmware/main/../wiring/inc/spark_wiring_timer.h:34: undefined reference to `os_timer_create'
collect2: error: ld returned 1 exit status
make[1]: *** [22fd80747f8449855b985497ea01cf2f6b0fa2d7fe1c902b3329465e3523.elf] Error 1
make: *** [main] Error 2
I’ve just gone with the defaults since I don’t have enough experience with this hardware to do anything other!