IonicWind Software

IWBasic => General Questions => Topic started by: REDEBOLT on March 26, 2009, 02:26:08 AM

Title: Problem with my linker
Post by: REDEBOLT on March 26, 2009, 02:26:08 AM
I have been coding merrily along, with no problems, and suddenly, this happens:

$MAIN
$INCLUDE "clsMAT.inc"
$INCLUDE "waitkey$.inc"
DECLARE IMPORT, GETTICKCOUNT(),UINT


Compiling...
Table7-2.eba
clsMAT.eba
gausjord.eba
File: R:\EBDev\projects\BOB\Applied Linear Regression\Table7-2\gausjord.eba (74) Warning: Uninitialized variable: MCol
File: R:\EBDev\projects\BOB\Applied Linear Regression\Table7-2\gausjord.eba (74) Warning: Uninitialized variable: PCol
File: R:\EBDev\projects\BOB\Applied Linear Regression\Table7-2\gausjord.eba (74) Warning: Uninitialized variable: PRow

Linking...
Emergence Linker v1.11 Copyright ÂÃ,© 2006 Ionic Wind Software
[b]Unresolved external __imp_GETTICKCOUNT
Error: Unresolved extern __imp_GETTICKCOUNT[/b]
Error(s) in linking Table7_2.exe


Somehow, I get Error: Unresolved extern __imp_GETTICKCOUNT

TIA
Title: Re: Problem with my linker
Post by: Rock Ridge Farm (Larry) on March 26, 2009, 05:27:41 AM
I think waitkey$ is a reserved word.
Title: Re: Problem with my linker
Post by: fasecero on March 26, 2009, 05:38:55 AM
Try replacing:


DECLARE IMPORT, GETTICKCOUNT(),UINT


with:


DECLARE IMPORT, _GETTICKCOUNT ALIAS GetTickCount(),INT


and when you need to use the function:


gtc=_GETTICKCOUNT()


Title: Re: Problem with my linker
Post by: LarryMc on March 26, 2009, 05:45:03 AM

delete your declare statement and
wherever gettickcount() is used in your program change it to MILLISECS() which is the exact same function built into EBasic commands.

Larry
Title: Re: Problem with my linker
Post by: LarryMc on March 26, 2009, 05:46:36 AM
Quote from: Rock Ridge Farm (Larry) on March 26, 2009, 05:27:41 AM
I think waitkey$ is a reserved word.
getkey without the $ is a keyword

Larry
Title: Re: Problem with my linker
Post by: LarryMc on March 26, 2009, 06:00:24 AM
if you use the gettickcount with the alias
DECLARE IMPORT, _GETTICKCOUNT ALIAS GetTickCount(),INT
make sure you spell the function name after the alias exactly as it is shown with the same upper/lower case letters.

I changed it just to see to this
DECLARE IMPORT, _GETTICKCOUNT ALIAS GETTICKCOUNT(),INT
and get the unresolved error.

Larry
Title: Re: Problem with my linker
Post by: LarryMc on March 26, 2009, 06:07:22 AM
if you change your original declare
DECLARE IMPORT, GETTICKCOUNT(),UINT
to DECLARE IMPORT, GetTickCount(),UINT
it will work
and when you call the function either way it will work:
gtc=GETTICKCOUNT()
gtc=GetTickCount()

still easier to just use MILLISECS()

Larry
Title: Re: Problem with my linker
Post by: REDEBOLT on March 26, 2009, 01:39:39 PM
Thanks to all for your replies.
Larry gave me the clue.
I had done some editing in another editor,
and it had capitalized "GetTickCount".

All is now well.

:D