This piece of code:
Code:
...compiles fine if it is compiled as C code, but if it is compiled as C++ code, compilation fails with the only linker error:
Code:
The same happens for RTC_GetTicks. I'm including the header file RTC_syscalls.h which contains definitions for both of these RTC syscalls (also, I have added proper "extern "C"" code to that header file, and the problem doesn't come from there).
Both syscalls are included in the libfxcg I'm using.
Any ideas? I really need to get "millisecond" precision (which is actually about 8 ms) and using that RTC_GetTime syscall would be the easiest way I believe.
EDIT: actually, I believe that if I had a way to use just RTC_GetTicks I could live without RTC_GetTime. If anyone knows of a way to return the number of ticks after midnight without RTC_GetTicks, that'd be good (but fixing the main syscalls-not-linking problem would be great).
Code:
RTC_GetTime( (unsigned int*)hour, (unsigned int*)minute, (unsigned int*)second, (unsigned int*)millisecond );
...compiles fine if it is compiled as C code, but if it is compiled as C++ code, compilation fails with the only linker error:
Code:
sh3eb-elf-g++ events.o lock.o main.o unixtime.o sha2.o toksplit.o -mb -m4a-nofpu -mhitachi -nostdlib -T/home/gabriel/CasioSDK/common/prizm.ld -Wl,-static -Wl,-gc-sections -L/home/gabriel/CasioSDK/lib -lfxcg -lc -lgcc -o /home/gabriel/CasioSDK/projects/utilities/utilities.bin
main.o: In function `_currentUnixTime':
main.cpp:(.text+0x7e0c): undefined reference to `RTC_GetTime(unsigned int*, unsigned int*, unsigned int*, unsigned int*)'
collect2: ld returned 1 exit status
make[1]: ** [/home/gabriel/CasioSDK/projects/utilities/utilities.bin] Error 1
make: ** [build] Error 2
The same happens for RTC_GetTicks. I'm including the header file RTC_syscalls.h which contains definitions for both of these RTC syscalls (also, I have added proper "extern "C"" code to that header file, and the problem doesn't come from there).
Both syscalls are included in the libfxcg I'm using.
Any ideas? I really need to get "millisecond" precision (which is actually about 8 ms) and using that RTC_GetTime syscall would be the easiest way I believe.
EDIT: actually, I believe that if I had a way to use just RTC_GetTicks I could live without RTC_GetTime. If anyone knows of a way to return the number of ticks after midnight without RTC_GetTicks, that'd be good (but fixing the main syscalls-not-linking problem would be great).