TailBite V1.3 for PB4.0X+PB4.10+PB4.20

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Tailbite fails to compile when the project imports a PB library. It will still fail even if the code is commented out.

http://www.purebasic.fr/english/viewtopic.php?t=30121
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Tailbite leaves a copy of the project source code in the temp directory after creating the library.

PureBasic_TempFile0, PureBasic_TempFile1 .. etc
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

TailBite does not generate these files it´s a PB thing :wink:
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

new version is out : TailBite V1.3 PR 1.863

http://www.tailbite.com/?download=TailB ... taller.exe
[25] DEC 18th 2007 TailBite v1.3 PR 1.863
- fixed error message when an import lib was not found (found by Mistrel)
- fixed handling of internal libs like 'window.lib' (found by Mistrel)
- fixed some Finishdirectory() missing
see first post for more deatils.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I'm getting this error again. I got it to go away once but now it's back. I reinstalled Tailbite but it still screams.

Code: Select all

---------------------------
TailBite Error
---------------------------
PBCompiler:  /COMMENTED /DEBUGGER

******************************************

PureBasic 4.10 (Windows - x86)

******************************************

Compiling D:\Program Files\PureBasic\TailBite\Samples\MyDebugErrorPlugin\MyDebugErrorPlugin.pb

Loading external libraries...

Starting compilation...

Error: Line 7 - TB_DebugError() is Not a function, array, Macro Or linked list


The pipe has been ended.


---------------------------
OK   
---------------------------
The help file mentions that this function is used from a TB debug library. No libraries are installed by tailbite and I can't find any in the src.pack.

I tried to use the libraries from the really old version on your site but tailbite won't let me compile the example with those either. It gives me this error

Code: Select all

---------------------------
Error
---------------------------
Can't open the FD file !
---------------------------
OK   
---------------------------
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

fixed ! You have to reinstall TailBite to get the TB_Debugger installed, or copy the file manually.

http://www.tailbite.com/?download=TailB ... taller.exe

Regards Klaus
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Thank you very much, ABBKlaus! :D
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I created a special function for reporting errors but it doesn't work. Is this a bug or something that just isn't possible with the way TailBite and the compiler handle errors?

Code: Select all

ProcedureDLL ErrorMsg(msg.s)
  ; do nothing if debugger is not present
EndProcedure

ProcedureCDLL ErrorMsg_DEBUG(msg.s)
  TB_DebugError(@msg.s)
EndProcedure

ProcedureDLL LibFunction()
	ErrorMsg("Hello!")
EndProcedure
I can't do this either

Code: Select all

ProcedureDLL InitGlobals_Init()
   Global Error
EndProcedure

ProcedureDLL LibFunction()
   ; cause an error
   Error=1
EndProcedure

ProcedureCDLL LibFunction_DEBUG()
   LibFunction()
   MessageRequester("","1")
   If Error
      MessageRequester("","2")
      TB_DebugError(@"Debug!")
   EndIf
EndProcedure
This works but cannot be compiled to an exe

Code: Select all

ProcedureDLL ErrorMsg(msg.s)
  ; do nothing if debugger is not present
EndProcedure

ProcedureCDLL ErrorMsg_DEBUG(msg.s)
  TB_DebugError(@msg.s)
EndProcedure

ProcedureDLL RuntimeError(msg.s,debugger)
	If debugger
		CallCFunctionFast(@ErrorMsg_DEBUG(),msg.s)
	Else
		MessageRequester("Error","Error message here!")
	EndIf
EndProcedure
This erroneously jumps to Main_Init() instead of ErrorMsg2() for some reason.

Code: Select all

ProcedureDLL Main_Init()
	messagerequester("Error","Huh?")
EndProcedure

ProcedureDLL ErrorMsg(msg.s)
  ; do nothing if debugger is not present
EndProcedure

ProcedureCDLL ErrorMsg_DEBUG(msg.s)
  TB_DebugError(@msg.s)
EndProcedure

ProcedureC ErrorMsg2(msg.s)
  TB_DebugError(@msg.s)
EndProcedure

ProcedureDLL RuntimeError(msg.s,debugger)
	If debugger
		CallCFunctionFast(@ErrorMsg2(),msg.s)
	Else
		MessageRequester("Error","Error message here!")
	EndIf
EndProcedure
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I did. I'm assuming that this fails because it's calling ErrorMsg() by its address which skips over ErrorMsg_DEBUG even when the debugger is present, right?

Code: Select all

ProcedureDLL ErrorMsg(msg.s)
  ; do nothing if debugger is not present
EndProcedure

ProcedureCDLL ErrorMsg_DEBUG(msg.s)
  TB_DebugError(@msg.s)
EndProcedure

ProcedureDLL LibFunction()
   ErrorMsg("Hello!")
EndProcedure
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Did you compiled this to a lib ?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I compiled it to a lib, yes.

There is also a bug where if I declare a procedure but not as a 'ProcedureDLL' the command hint will still appear at the bottom of the IDE.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@Mistrel,

your calling the debug-function out of scope, this won´t work !
After the PureBasic debugger calls the debug function (MyDiv_DEBUG in the example), it calls the original function, MyDiv().
In your example you are calling LibFunction , the compiler did not find any LibFunction_DEBUG , so there is not debugger message send !
There is also a bug where if I declare a procedure but not as a 'ProcedureDLL' the command hint will still appear at the bottom of the IDE.
How can that be a bug of TailBite ?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

ABBKlaus wrote:
There is also a bug where if I declare a procedure but not as a 'ProcedureDLL' the command hint will still appear at the bottom of the IDE.
How can that be a bug of TailBite ?
What I meant so say what that if I declare a procedure inside of a Tailbite library as Procedure and not ProcedureDLL the command will appear as a hint at the bottom of the IDE when the library is included by the compiler. PB will error on compile because this procedure isn't really available.
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

i havent fiddled much with Tailbite yet but i assume it generates the #PBIMPORT tag even for the normal procedures.

in C++ theese are defined in comments:

Code: Select all

#PBIMPORT:Foo_Functionblah(*abc, b.l)
arr once am done with my far too long queue i am gonna give this a whirl.

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Post Reply