It is currently Thu Jun 20, 2013 1:02 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SYMBOL_ALREADY_DEFINED - !EXTRN _PB_Screen_Depth
PostPosted: Wed Jan 12, 2011 8:05 am 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 929
any chance to fix this?
Code:
Procedure Depth()
  !EXTRN _PB_Screen_Depth
  !MOV eax, [_PB_Screen_Depth]
  ProcedureReturn
EndProcedure

Procedure Screen()
  OpenScreen(640, 480, 16, "")
EndProcedure

Quote:
---------------------------
TailBite Error
---------------------------
FAsm: Shared\Depth.asm

Error

Line no: 14

Error code: -127

Error String: SYMBOL_ALREADY_DEFINED
---------------------------
OK
---------------------------

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
 
 Post subject: Re: SYMBOL_ALREADY_DEFINED - !EXTRN _PB_Screen_Depth
PostPosted: Wed Jan 12, 2011 11:29 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1024
Location: Australia
have you tried this?
Code:
Import ""
_PB_Screen_Depth
EndImport


Import works for variables too (and TB should be able to handle it)

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
 
 Post subject: Re: SYMBOL_ALREADY_DEFINED - !EXTRN _PB_Screen_Depth
PostPosted: Wed Jan 12, 2011 11:39 am 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 929
same error. :(

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
 
 Post subject: Re: SYMBOL_ALREADY_DEFINED - !EXTRN _PB_Screen_Depth
PostPosted: Thu Jan 13, 2011 1:16 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1024
Location: Australia
this code works (and is easier to port to x64 as there's no need for change [unsure if this symbol has the same name in x64]):
Code:
Import ""
PB_Screen_Depth
EndImport

Procedure Depth()
  ProcedureReturn PB_Screen_Depth
EndProcedure

Procedure Screen()
  OpenScreen(640, 480, 16, "")
EndProcedure


Though I will take a look into the extrn issue; but if you prefer the ASM way, just comment out the !extrn line; TB can figure out that its an external symbol by itself.

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
 
 Post subject: Re: SYMBOL_ALREADY_DEFINED - !EXTRN _PB_Screen_Depth
PostPosted: Sat Jan 15, 2011 12:00 am 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 929
thanks, i always forget that _ is only the decoration. :)

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye