Page 4 of 10

Posted: Sun Sep 02, 2007 10:54 am
by ABBKlaus
Hi,

@eddy, what version of tailbite are you using ? I have no problems compiling this to MyDebugErrorPlugin :

Code: Select all

ProcedureDLL MyDivZ(a, b)
  ProcedureReturn a/b
EndProcedure

ProcedureCDLL MyDivZ_DEBUG(a, b)
  If b=0
    TB_DebugError(@"Division by zero!")
  EndIf
EndProcedure
and for the complete path in TBManager you have to enable Display full Source Path in TitleBar in the PureBasic-Preferences :wink:

Posted: Sun Sep 02, 2007 10:56 am
by ABBKlaus
Just forgot to say :

new version is out : V1.3 PR 1.856
[18] AUG 30th 2007 TailBite v1.3 PR 1.856
- fixed *_Init bug found by nco2k



see first post for more details.

Regards Klaus

Posted: Sun Sep 02, 2007 2:27 pm
by nco2k
thx klaus, works good now. :)

c ya,
nco2k

Posted: Sun Sep 02, 2007 2:39 pm
by eddy
Oops It was my fault, I clicked on the wrong link.
I tested an old version. :lol:

Posted: Sat Sep 08, 2007 12:44 pm
by eddy
Does this beta version support ASM code ?

Code: Select all

Structure myStruct 
  val.l
  text.s 
EndStructure 

ProcedureDLL.s d()
  Protected *a.myStruct 
  Protected b.myStruct
  Protected *result.myStruct    
  b\val=11111
  
  *a=@b
    
  !MOV Eax,[p.p_a] ;<---- here : unknown symbol
  !MOV [p.p_result],Eax 
  
  ProcedureReturn Str(*result\val)
EndProcedure

Posted: Sat Sep 08, 2007 10:53 pm
by ABBKlaus
@eddy :

it was this part of code that was causing the problems :

Code: Select all

        ElseIf Left(ThisLine$, 3)="; !"            ;   CORREGIR ESTO PARA CUANDO HAYA ASM COMENTADO: ; !mov [v_R],... (Rings)
          If Right(ThisLine$, 1)<>":"
            cpos = FindString(ThisLine$, ";", 2)
            If cpos
              THS$ = RTrim(Left(ThisLine$, cpos))
            Else
              THS$ = RTrim(ThisLine$)
            EndIf
            THS$ = Trim(RemoveString(THS$, "; !"))
            ThisLine$+WNL$
            CopyMemoryString(@ThisLine$)
            FileSeeker = FindNextString(WNL$, FileSeeker, FileEnd)+Len(WNL$)
            ThisLine$ = THS$
            Goto CheckASM
          EndIf
i commented them out, i hope without side effects :oops:

new version is out : V1.3 PR 1.857
[19] SEP 8th 2007 TailBite v1.3 PR 1.857
- fixed problem with asm comments ; ! (found by eddy)
see first post for more details.

Regards Klaus

Posted: Sat Sep 08, 2007 11:41 pm
by eddy
ABBKlaus wrote: new version is out : V1.3 PR 1.857
[19] SEP 8th 2007 TailBite v1.3 PR 1.857
- fixed problem with asm comments ; ! (found by eddy)
Wait a minute :!: :!: ... The problem is not the commented ASM.
The problem is purebasic ASM symbol (like [p.p_a] )

I made a test :
MOV *a.eax ---> tailbite compiles correctly
!MOV [p.p_a].eax ---> tailbite send an error message

Image

Posted: Sun Sep 09, 2007 9:41 am
by ABBKlaus
@eddy,

i have no problems compiling your code with the new version.
here is the compiled asm code :

Code: Select all

; *a=@b
LEA    eax,[esp+4]
MOV    dword [esp],eax
;
; !MOV Eax,[p.p_a]
p.p_a equ esp+0
p.p_result equ esp+12
p.v_b equ esp+4
MOV Eax,[p.p_a]
; !MOV [p.p_result],Eax
MOV [p.p_result],Eax
Regards Klaus

Posted: Sun Sep 09, 2007 11:05 am
by DoubleDutch
PureBasic must do something to the local variables before they are passed to FASM. That could be why code with the '!' didn't work?

Posted: Sun Sep 09, 2007 12:37 pm
by eddy
I tested it
It works :D thx

Why does it use commented line ?

Posted: Wed Oct 10, 2007 5:15 pm
by ABBKlaus
new version is out : V1.3 PR 1.858
[20] OKT 10th 2007 TailBite v1.3 PR 1.858
- fixed problem with PB folder detection code
see first post for more details.

Regards Klaus

Posted: Wed Oct 17, 2007 5:54 pm
by srod
Hi,

everything I tailbite (with the latest version of Tailbite and PB 4.1 beta 4), when the resulting library is used, I get the following linker error :

POLINK : fatal error : File not found : ':Import.LIB'

As I say, Tailbite runs okay and produces the library, but the problem is when I try to use the library etc.

Any ideas?

Thanks.


**EDIT : I went back and compiled with PB 4.1 beta 3 with the earlier version of Tailbite and the resulting libraries run fine; even with PB 4.1 beta 4.

Posted: Wed Oct 17, 2007 6:11 pm
by ABBKlaus
@srod,

a working snippet to reproduce the problem would be fine :roll:

Posted: Wed Oct 17, 2007 6:15 pm
by srod
Difficult; both projects I just compiled are huge; but compile fine with PB 4.1 beta 3 and Tailbite 1.3 PR 1.48.

What I can say is that both projects import the GradientFill() function.

I'll try creating a very small program then which reproduces this problem.

Posted: Wed Oct 17, 2007 6:30 pm
by srod
Right, I get the same problem with the following :

Code: Select all

ProcedureDLL.l test(a)
  a+1
  ProcedureReturn a
EndProcedure
I can create the user library okay, but when I try and use this with a simple program

Code: Select all

b = test(6)
I get exactly the same error reported above.

:?