It is currently Thu Apr 25, 2019 10:58 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [Done]Problem with static and PB 520 beta 5/6
PostPosted: Sat Jul 13, 2013 5:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hello,

i found a problem with the function static and PB 5.20 Windows. In the procedure the static variabe is not set to "extrn". I hope you find a solution:

Code:
ProcedureDLL  Mytest (Var)
 
  Static *pointer
 
  If Not *pointer
    *pointer = 10
  EndIf
  ProcedureReturn var + *pointer
EndProcedure


error undefinite_symbol

as code

Code:
format MS COFF

Public PB_Mytest

section '.text' code readable executable

PB_Mytest:
PUSH   ebx
PS0=8
;
; Static *pointer
;
; If Not *pointer
CMP    dword [so_Mytest.p_pointer],0  <- error



it is missing

Code:
extrn so_Mytest.p_pointer


i hope this helps to solve the problem...

Greeting Michael

_________________
Working on - MP3D Library -


Last edited by mpz on Thu Jul 18, 2013 8:38 pm, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with static and PB 520 beta 5
PostPosted: Sun Jul 14, 2013 8:16 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 1036
The helpfile of tailbite :

Quote:
Note on using STATIC keyword : The static keyword is not supported by tailbite. (The generated PureBasicStart routine is not evaluated.)
Please use a Global variable instead and initialize it in the Init function.

_________________
PureBasic 5.70 LTS (Windows x86/x64) | Windows10 Pro x64 | Z370 Extreme4 | i7 8770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language... (I often use DeepL to translate my texts.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with static and PB 520 beta 5
PostPosted: Sun Jul 14, 2013 9:36 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi Bisonte,

i use static since 3 years with tailbite and PB and it woks fine. I think it is only a little think for changing. If it is not possible i will test it with global...

Greetings Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with static and PB 520 beta 5
PostPosted: Mon Jul 15, 2013 5:13 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Know issues wrote:
- The use of the Static keyword is limited to basic types : Byte,Word,Long,Integer,Quad,Double
You can´t use Strings / Dim() as they allocate memory in a different place of code that TailBite is not parsing

It was totally legal until PB5.20 came out :twisted:

I´ll try to fix it :shock:


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with static and PB 520 beta 5
PostPosted: Mon Jul 15, 2013 6:46 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
I found out that static objects got renamed to "so_" in older Versions it was "s_". I added it to the List of VarAliases in TailBite_Res.pb.

It might not be the last Change to be found.

Here´s the download : http://www.tailbite.com/downloads/TailBiteV1.4.10.zip

BR Klaus


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with static and PB 520 beta 5
PostPosted: Tue Jul 16, 2013 1:39 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hello ABBKlaus,

i tested it with Windows XP, my (monster) code and PB 5.20 Beta 5 and it works fine. Tomorrow i will test it with Windows 7 and PB 5.2 x86 and x64...

*P.S.: tested with Windows 7 x86 and x64, works fine

Much thanks
Michael

_________________
Working on - MP3D Library -


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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