02 November 2019, 18:42 | #1 |
Newbie Amiga programmer
Join Date: Jun 2012
Location: Front of my A500+
Age: 38
Posts: 372
|
GetSysTime() fails to find TimerBase
I'm trying to use
GetSysTime(), but i get back these messages from the compiler: Code:
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: /tmp/ccb4VwWC.o: in function `main': /tmp/ccb4VwWC.o:(.text+0x21c): undefined reference to `TimerBase' /opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: /tmp/ccb4VwWC.o:(.text+0x1fe): undefined reference to `TimerBase' collect2: error: ld returned 1 exit status TimerBase. proto/timer.his included. The following initializations are done before it: Code:
mp = CreateMsgPort(); tr = (struct timerequest *)CreateIORequest(mp, sizeof(struct timerequest)); OpenDevice(TIMERNAME, UNIT_MICROHZ, (struct IORequest *)tr, 0); |
02 November 2019, 19:12 | #2 |
Registered User
Join Date: Apr 2013
Location: Mallorca
Posts: 758
|
I'm guessing you need something like that:
Code:
static struct Device *TimerBase; if (!TimerBase) TimerBase = (struct Device *)FindName(&SysBase->DeviceList,"timer.device"); |
02 November 2019, 22:41 | #3 |
Newbie Amiga programmer
Join Date: Jun 2012
Location: Front of my A500+
Age: 38
Posts: 372
|
Well, it was
Code:
static struct Device *TimerBase = tr->tr_node.io_Device; |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WHDload fails on CD32 | Marchie | support.Hardware | 27 | 01 October 2019 14:35 |
Fails to find disk 2 | dtr1001 | support.FS-UAE | 9 | 25 August 2013 21:10 |
TSgui fails with adz | Rabbit80 | support.Other | 7 | 19 May 2009 00:34 |
WHDLoad Installer Fails | Techx | project.WHDLoad | 0 | 19 April 2009 06:25 |
Amistart 0.65 always fails | keropi | support.Apps | 4 | 28 November 2005 15:52 |
|
|