Code PBLibs in PB

Developed or developing a new product in PureBasic? Tell the world about it.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

So, you're saying that, after saving this code with inline ASM enabled, and running TailBite, it still gives you that error:

Code: Select all

ProcedureDLL MyHiddenBug()
  Value.l = 10
  MOV eax,Value
EndProcedure
Here, it compiles fine 8O

But, just in case, download the latest version, please (1.0 Beta 10.05):

http://inicia.es/de/elchoni/TailBite/
http://www.terra.es/personal5/temporald/TailBite/
http://perso.wanadoo.es/tailbite/
El_Choni
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

Hi El_Choni
Here the asm only works with the original editor not with japbe

if the last lines of the files are

Code: Select all

; ExecutableFormat=Windows
; EnableAsm
; EOF
it works

this doesnt work:

Code: Select all

; jaPBe Version=1.4.1.31
; Build=0
; FirstLine=0
; CursorPosition=0
; EnableAsm
; ExecutableFormat=Windows

; DontSaveDeclare
; EOF
[/code]
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Well, I was using JaPBe... It works with the original editor :)
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Thanks, it should work now with japbe too, could you test it?
El_Choni
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Yeah, it works now, thanks !
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

TBTemp\Function .text: undefined reference to '_PB_EOP_NoVal

Post by gnozal »

I have just tried TailBite with a .pbi I use. I have renamed the exported functions to ProcedureDLL, and it compiled to LIB without errors.
Now when I try to compile a program that uses a function from this new lib, I got this error :

Code: Select all

TBTemp\Function .text: undefined reference to '_PB_EOP_NoValue'
What could be the reason ?
PS : I use jaPBe.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Well, it looks like a bug ;)

Could you please post or send me the minimum code to reproduce this problem?

EDIT: I think it's fixed, could you test the new version, please?
El_Choni
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Re: TBTemp\Function .text: undefined reference to '_PB_EOP_N

Post by Pupil »

gnozal wrote:I have just tried TailBite with a .pbi I use. I have renamed the exported functions to ProcedureDLL, and it compiled to LIB without errors.
Now when I try to compile a program that uses a function from this new lib, I got this error :

Code: Select all

TBTemp\Function .text: undefined reference to '_PB_EOP_NoValue'
What could be the reason ?
PS : I use jaPBe.
Do you have an End-statement in your source?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

El_Choni wrote:Well, it looks like a bug ;)

Could you please post or send me the minimum code to reproduce this problem?

EDIT: I think it's fixed, could you test the new version, please?
I tried with the new version, the message is quite the same :

Code: Select all

TBTemp\Function .text: undefined reference to 'PureValid__PB_EOP_NoValue'
@El Choni : I have send you a PM with the LIB source code.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Fixed, but I think it's not a good idea to put 'End' statements in an user library. Anyway, now you can do it if you want.

BTW, you'll notice that, if you don't use string operations in the caller code, the pbcompiler will complain about some functions missing. This problem is explained in the help file, and will be fixed (in TailBite) when the next PureBasic version is released.
El_Choni
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

El_Choni wrote:Fixed, but I think it's not a good idea to put 'End' statements in an user library. Anyway, now you can do it if you want.
Thanks! Sorry for this, but it was not intended to be a LIB, it's just some .pbi I used to see how TailBite works. Great work, as usual!
El_Choni wrote:BTW, you'll notice that, if you don't use string operations in the caller code, the pbcompiler will complain about some functions missing. This problem is explained in the help file, and will be fixed (in TailBite) when the next PureBasic version is released.
Yes, I noticed that !
BTW, when do you update your libraries (like SQLLITE)? :lol:
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

The new cgi lib is almost finished. When i finish tailbite 1.0 (very soon), i'll fix the sqlite lib. I don't have 48 hours a day, you know ;)
El_Choni
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

El_Choni wrote:The new cgi lib is almost finished. When i finish tailbite 1.0 (very soon), i'll fix the sqlite lib. I don't have 48 hours a day, you know ;)
I'm coming to spain in fall, and I'm more than happy to hear, that the day has 48 hours there :D
RValois
User
User
Posts: 16
Joined: Fri Aug 15, 2003 6:31 am
Location: Brazil
Contact:

Post by RValois »

Hi El_Choni,
Thank you for the TailBite.
I found a problem trying to generate a lib with a recursive procedure.

Code: Select all

Procedure Teste1(i.l)

  If i>=100
    ProcedureReturn
  EndIf
  
  Teste1(i+1)

EndProcedure

ProcedureDLL Teste()

  Teste1(0)
  
EndProcedure
The error msg:
FAsm: Shared\Teste1.asm
flat assembler version 1.47
TBTemp\Functions\Shared\Test1.asm[10]:
TestLib_Teste1:
error: symbol already defined.
Another thing, is it possible to get the unpaked sources?
I did not manage to generate the sources from TBManager.
Thank you again,
RValois.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Thanks, recursive procedure calling is fixed now.

Now the source is not included with the installer for file size's sake. You can download the source here:

http://inicia.es/de/elchoni/TailBite/
http://www.terra.es/personal5/temporald/TailBite/
http://perso.wanadoo.es/tailbite/

Put "src.pack" in the TailBite folder and click on the "Extract TailBite sources" button.

Thanks again,
El_Choni
Post Reply