English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 02 November 2019, 18:42   #1
TCH
Newbie Amiga programmer

 
Join Date: Jun 2012
Location: Front of my A500+
Age: 34
Posts: 184
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
Actually, if i try to build it with SASC, it also fails to find
TimerBase
.

proto/timer.h
is 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);
What else should be needed?
TCH is offline  
Old 02 November 2019, 19:12   #2
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 642
I'm guessing you need something like that:

Code:
static struct Device *TimerBase;

if (!TimerBase)
	TimerBase = (struct Device *)FindName(&SysBase->DeviceList,"timer.device");
Without seeing the code and depending of what you are trying to do sometimes you don't even need to create a msgport.
Cowcat is offline  
Old 02 November 2019, 22:41   #3
TCH
Newbie Amiga programmer

 
Join Date: Jun 2012
Location: Front of my A500+
Age: 34
Posts: 184
Well, it was
Code:
static struct Device *TimerBase = tr->tr_node.io_Device;
but you're right, manually adding the declaration solved the problems, thank you.
TCH is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.06165 seconds with 13 queries