Page 7 of 10
Posted: Mon Dec 17, 2007 11:15 pm
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
Posted: Tue Dec 18, 2007 10:16 am
by Mistrel
Tailbite leaves a copy of the project source code in the temp directory after creating the library.
PureBasic_TempFile0, PureBasic_TempFile1 .. etc
Posted: Tue Dec 18, 2007 8:12 pm
by ABBKlaus
TailBite does not generate these files it´s a PB thing

Posted: Tue Dec 18, 2007 10:56 pm
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.
Posted: Thu Dec 20, 2007 10:45 am
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
---------------------------
Posted: Fri Dec 21, 2007 8:12 pm
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
Posted: Fri Dec 21, 2007 8:27 pm
by Mistrel
Thank you very much, ABBKlaus!

Posted: Fri Dec 21, 2007 9:31 pm
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
Posted: Mon Dec 24, 2007 12:44 am
by ABBKlaus
Posted: Mon Dec 24, 2007 2:10 am
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
Posted: Mon Dec 24, 2007 12:10 pm
by ABBKlaus
Did you compiled this to a lib ?
Posted: Tue Dec 25, 2007 12:27 am
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.
Posted: Fri Dec 28, 2007 10:52 am
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 ?
Posted: Sun Dec 30, 2007 12:01 am
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.
Posted: Sun Dec 30, 2007 12:20 am
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