Page 10 of 40

Posted: Sun Jul 18, 2004 10:59 pm
by NoahPhense
Works like a freakin champ over here..

Maybe you are launching from inside the IDE ? Cause then it would spit
the file out in your compilers directory. Else you are not saving your
file before trying to convert it to a lib ?

TailBite Rulez! :twisted:

Code: Select all

ProcedureDLL.l testingLoops(filename.s)
  ret = 0
  If CreateFile(0,filename) 
    For a = 1 To 1000 
      WriteStringN("Procedure Test" + Str(a) + "()") 
      WriteStringN(" b = 0") 
      WriteStringN("EndProcedure")  
    Next a 
    CloseFile(0)
    ret = 1
  EndIf
  
  ProcedureReturn ret
EndProcedure
USAGE:

Code: Select all

testingLoops("testResults.pb")

End
- np

Posted: Sun Jul 18, 2004 11:21 pm
by Comtois
i just want create un big file ( a= 1 to 1000) => "TestTailbite1.pb".Tailbite don't work with big file.

if i create a small file ( a=1 to 10 ) => "TestTailbite1.pb", tailbite work fine.

Sorry for my poor english :?

Posted: Sun Jul 18, 2004 11:51 pm
by El_Choni
@Comtois: could you be more specific about the error you get? What does it say?

Posted: Sun Jul 18, 2004 11:59 pm
by Comtois
if i click "check for error" , it's ok
---------------------------
TailBite
---------------------------
PBCompiler reported no errors.
---------------------------
OK
---------------------------
if i click tailbite it ! , i got this ( with big file )
---------------------------
TailBite Error
---------------------------
polib:
POLIB: fatal error: File not found: 'dProcú'.


Le canal de communication a été fermé.

---------------------------
OK
---------------------------
if number of lines change , message change too .
---------------------------
TailBite Error
---------------------------
polib:
POLIB: fatal error: File not found: 'à8'.



Le canal de communication a été fermé.


---------------------------
OK
---------------------------

Posted: Mon Jul 19, 2004 12:15 am
by thefool
isnt he trying to tailbite a big .pb file with 1000 procedures in it?
just want create un big file ( a= 1 to 1000)=> "TestTailbite1.pb"
that would be a long post :)

..

Posted: Mon Jul 19, 2004 12:20 am
by NoahPhense
@thefool

Read page 9..

- np

..

Posted: Mon Jul 19, 2004 12:23 am
by NoahPhense
Comtois wrote:Hi El Chroni

i try this code with a = 1 to 1000 , then i use tailbite with TestTailbite1.pb , i got an error .
Then i try with a = 1 to 10 , and all is ok , no error , and the library is create.

I suppose tailbite don't like lot of ( many ) lines ?

Code: Select all

If CreateFile(0,"TestTailbite1.pb") 
  For a= 1 To 1000 
    WriteStringN("Procedure Test" + Str(a) + "()") 
    WriteStringN(" b = 0") 
    WriteStringN("EndProcedure")  
  Next a 
  CloseFile(0) 
EndIf 
Ah I see I think..

Change to this:
WriteStringN("ProcedureDLL Test" + Str(a) + "()")

TailBite Procedures all have to be ProcedureDLL .. that is, if you want them
to be accessable from externally (extern).

- np

Posted: Mon Jul 19, 2004 3:35 am
by Paul
The latest builds of TailBite have severe problems.
I have a file called test.pb and when I try an run TailBite on it I get this:
---------------------------
TailBite Error
---------------------------
polib:
POLIB: fatal error: File not found: '‰'.
The pipe has been ended.
---------------------------
OK
---------------------------
Now if I copy the contents of the file and save it as test2.pb then try TailBite again...
It works fine.

What's going on here? The data is identical, only the filename has changed.

By the way, if I look at the temp data created on the first file that fails, the last couple of lines in TestObjFiles.txt reads:
TBTemp\Functions\TestShared.obj
TBTemp\Functions\Shared\Test_End.obj
ë$
Tailbite has added garbage at the end.

Hmm, very strange.
Better take a look El_Choni :)


ps. If I use TailBite v0.7 on either of these files, they both work fine.

Posted: Mon Jul 19, 2004 4:25 am
by Paul
LOL... looks like NoahPhense has elected himself official spokesperson for TailBite ;)

Anyhow, my message was for you El_Choni.
I'm hoping you see it and get a head start on the problem before I bump into you on IRC (and spend a few more hours in a debugging session).

It is very strange that TailBite sees 2 files differently, when they contain the exact same data.

..

Posted: Mon Jul 19, 2004 5:20 am
by NoahPhense
Rant & Rave (revised)

Sorry, I get a little carried away sometimes. ;)

I agree that it's not bug free. But I will say that if you read this page and
several pages back, you will find that the user not knowing what they are
doing creates a lot of these errors. For example, the issue above, with
the 1000 procedures, they should be ProcedureDLL’s.

No offense, hence my name, Noah Phense.. :twisted:

What gets my goat is people who come in and say, “TB is broken. This
wont work and that won’t work.â€

Posted: Mon Jul 19, 2004 5:23 am
by El_Choni
I'm afraid TailBite is doing some wrong file operations when creating the objfiles.txt file. Again (tsk, tsk, naughty boy!). I'll check the code and try to convince my brother that I need to install and use PB in his computer, and he'll have to go play Battlefield somewhere else XD

Thank you guys for your help and patience, you're being very helpful with your reports, and sorry for the problems that have arisen lately with TB

Regards,

Re: ..

Posted: Mon Jul 19, 2004 8:19 am
by Comtois
NoahPhense wrote: But I will say that if you read this page and
several pages back, you will find that the user not knowing what they are
doing creates a lot of these errors. For example, the issue above, with
the 1000 procedures, they should be ProcedureDLL’s.


Oh, and before building libraries, please learn to code DLL’s first.


* A GOOD rule of thumb, is if your app doesn't work as a DLL, then it will
not work as a library.
tailbite Help say that :
You can use normal Procedure's for internal library use. Executables that use your library will only include the functions that are used in the code, and only the internal functions used by those functions. To achieve this, the 'PureBasic.asm' file has to be splitted and compiled into several OBJ files:
i create a file just for testing tailbite it , not for making a library !!

if i replace Procedure by ProcedureDll , i get the same message !!

Posted: Mon Jul 19, 2004 10:04 am
by thefool
Actually comtois is right. In a DLL you can use normal "procedure" if the procedure is local. If it needs to be accesible by other programs, then "proceduredll". But i can not tell if you need at least one "proceduredll". Otherwise the dll could not be used for anything.

..

Posted: Mon Jul 19, 2004 4:04 pm
by NoahPhense
thefool wrote:But i can not tell if you need at least one "proceduredll". Otherwise the dll could not be used for anything.
Ok, today is the day that people get to learn how I acquired the nickname
Noah Phense. It stands for No Offense. So, if you cannot take advice, or
personal criticism, then please, stop reading now.

No, you cannot have a DLL or a LIB without a ProcedureDLL. (fact)

Here's my functional code to back up the things *I'm* talking about.

Just create a regular exe with this, and then execute it. Don’t execute
stuff like this from inside the IDE, unless your looking for problems, then
by all means, go ahead. Format your harddrive while your at it.

Code: Select all

Procedure Create1000(filename.s)
  If CreateFile(0,filename) 
    For a = 1 To 1000 
      WriteStringN("Procedure Test" + Str(a) + "()") 
      WriteStringN(" b = 0") 
      WriteStringN("EndProcedure")  
    Next a 
    CloseFile(0) 
    ret = 1 
  Else
    Goto getout
  EndIf
EndProcedure
  
Procedure AppendFile(FileName.s, String.s) 
  If OpenFile(99, FileName) 
    FileSeek(Lof()) 
    WriteStringN(String) 
    CloseFile(99) 
  EndIf 
EndProcedure 

Create1000("test.pb")
AppendFile("test.pb", "ProcedureDLL.l tTest(a.l, b.l)")
AppendFile("test.pb", "  c.l = a + b")
AppendFile("test.pb", "  ProcedureReturn c")
AppendFile("test.pb", "EndProcedure")

getout:
End
If you used your “cut and pasteâ€

Posted: Mon Jul 19, 2004 5:24 pm
by thefool
i am beginning to understand why you took that name, noaphence..:
Noah Phense ( aka No Offense )
:D