Page 1 of 1

SBL2E build error at gettime of day

Posted: Tue Oct 05, 2010 3:17 pm
by Ridgeglider
I am trying to decipher the console output below when building an SBL2E project. It seems to be telling me that it can't find code for a function called gettimeofday, but this must be a low-level call as it's not one I called directly. Any ideas? I did a rebuild all on the system files... I'm using Rel24_rc2.

Thanks


**** Rebuild of configuration Release for project SBL2E_GPS_Altimeter_V1 ****

**** Internal Builder is used for build ****
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oNMEA\NMEA_Parser.o ..\NMEA\NMEA_Parser.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -omain.o ..\main.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oALTIMETER\NMEA_Altimeter.o ..\ALTIMETER\NMEA_Altimeter.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oALTIMETER\AltimeterVariables.o ..\ALTIMETER\AltimeterVariables.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oPROJECT_BASE\Project_IO.o ..\PROJECT_BASE\Project_IO.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oPROJECT_BASE\Project_GlobalVariables.o ..\PROJECT_BASE\Project_GlobalVariables.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:/nburn/include_sc -IC:/nburn/SBL2E/include -IC:/nburn/gcc-m68k/m68k-elf/include -ID:/WOKSPACE_UDP_COMM/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1/SBL2E_GPS_Altimeter_V1 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5213 -DSBL2E -DMCF52234 -oNMEA\NMEA_ProcessingTask.o ..\NMEA\NMEA_ProcessingTask.cpp
m68k-elf-g++ main.o PROJECT_BASE\Project_IO.o PROJECT_BASE\Project_GlobalVariables.o NMEA\NMEA_ProcessingTask.o NMEA\NMEA_Parser.o ALTIMETER\NMEA_Altimeter.o ALTIMETER\AltimeterVariables.o -Wl,-Map=SBL2E_GPS_Altimeter_V1.map -mcpu=5213 -Wl -Wl,-n -TC:\nburn\SBL2E\lib\SBL2E.ld -Wl,-RC:\nburn\SBL2E\lib\sys.ld -Wl,--start-group,C:\nburn\lib\SBL2E.a C:\nburn\lib\NetBurner_sc.a -Wl,--end-group -oSBL2E_GPS_Altimeter_V1.elf
c:/nburn/gcc-m68k/bin/../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/lib/m5213\libc.a(lib_a-gettimeofday.o): In function `_gettimeofday_r':
gettimeofday.c:(.text+0x14): undefined reference to `gettimeofday'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 2232 ms.

Re: SBL2E build error at gettime of day

Posted: Tue Oct 05, 2010 4:14 pm
by Ridgeglider
Looks like the trouble is with the call to the function: time() from time.h:

I have the function:

Code: Select all

time_t GetSysTimeAsTime_t(void) {
	time_t SYS_time_t;			// Create a time_t variable to hold System time.
	time( &SYS_time_t );		// Load it with the system time.
	return SYS_time_t;
}
If I comment this out, things compile OK....
Workarounds?