TailBite 1.0 Preview, soon in PureProject and PureArea
Moderators: gnozal, ABBKlaus, lexvictory
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I confirm some problems with ImportC.
Using TailBite 1.3 PR 1.7 with BriefLZ.lib ( http://www.ibsensoftware.com/files/BriefLZ104.zip [BriefLZ104.zip\lib\vc\brieflz.lib] )
Error : POLIB fatal error : file not found "TBTemp\Functions\TB_Imported_Lib_0.lib"
Note that if I replace 'ImportC "brieflz.lib"' with 'ImportC "C:\PureBasic400\Program\brieflz.lib"' (full path), TailBite compiles the lib without error (but seems to crash at the end when started from jaPBe via RunProgram), and the test program works ok.
Using TailBite 1.3 PR 1.7 with BriefLZ.lib ( http://www.ibsensoftware.com/files/BriefLZ104.zip [BriefLZ104.zip\lib\vc\brieflz.lib] )
Code: Select all
ImportC "brieflz.lib"
_blz_workmem_size.l(InputSize.l) As "_blz_workmem_size"
_blz_max_packed_size.l(InputSize.l) As "_blz_max_packed_size"
_blz_pack.l(*Source, *Destination, length.l, *WorkMem) As "_blz_pack"
_blz_crc32.l(*Source, length.l, InitialCrc32.l) As "_blz_crc32"
_blz_depack.l(*Source, *Destination, DepackedSize.l) As "_blz_depack"
EndImport
;
ProcedureDLL BriefLZ_WorkMemSize(InputSize.l) ; Computes the required size of the WorkMem buffer used by BriefLZ_Pack() for compressing InputSize bytes of data.
ProcedureReturn _blz_workmem_size(InputSize.l)
EndProcedure
;
ProcedureDLL BriefLZ_MaxPackedSize(InputSize.l) ; Computes the maximum possible compressed size possible when compressing InputSize bytes of incompressible data.
ProcedureReturn _blz_max_packed_size(InputSize)
EndProcedure
;
ProcedureDLL BriefLZ_Pack(*Source, *Destination, length.l, *WorkMem) ; Compresses Length bytes of data from *Source into *Destination, using *WorkMem buffer for temporary storage.
ProcedureReturn _blz_pack(*Source, *Destination, length, *WorkMem)
EndProcedure
;
ProcedureDLL BriefLZ_Depack(*Source, *Destination, DepackedSize.l) ; Decompresses the compressed data from *Source into *Destination.
ProcedureReturn _blz_depack(*Source, *Destination, DepackedSize)
EndProcedure
;
ProcedureDLL BriefLZ_Crc32(*Source, length.l, InitialCrc32.l) ; Computes the CRC32 value of Length bytes of data from *Source.
ProcedureReturn _blz_crc32(*Source, length, InitialCrc32)
EndProcedure
Note that if I replace 'ImportC "brieflz.lib"' with 'ImportC "C:\PureBasic400\Program\brieflz.lib"' (full path), TailBite compiles the lib without error (but seems to crash at the end when started from jaPBe via RunProgram), and the test program works ok.
Code: Select all
;
; BriefLZ test file 1
;
TestString.s = "ThisIsATestThisIsATestThisIsATestThisIsATestThisIsATestThisIsATestThisIsATestThisIsATest"
TestString = TestString + TestString + TestString + TestString + TestString + TestString + TestString
;
Length.l = Len(TestString)
MaxPackedSize.l = BriefLZ_MaxPackedSize(Length)
WorkMemSize.l = BriefLZ_WorkMemSize(Length)
*WorkMem = AllocateMemory(WorkMemSize)
*Destination = AllocateMemory(MaxPackedSize)
;
*Source = AllocateMemory(Length)
CopyMemory(@TestString, *Source, Length)
Debug BriefLZ_Crc32(*Source, Length, 0)
;
Debug BriefLZ_Pack(*Source, *Destination, Length, *WorkMem)
;
TestString2.s = Space(Length)
;
Debug BriefLZ_Depack(*Destination, *Source, Length);
CopyMemory(*Source, @TestString2, Length)
Debug TestString2
;
If TestString = TestString2
Debug "Success"
Else
Debug "Failed"
EndIf
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Testing ImportC with TailBite 1.3 PR 1.8 and BriefLZ.lib :
- no more crash ;
- but still an error if relative path is used (file not found "TBTemp\Functions\TB_Imported_Lib_0.lib) : not a big issue for me, though.
Thanks !
- no more crash ;
- but still an error if relative path is used (file not found "TBTemp\Functions\TB_Imported_Lib_0.lib) : not a big issue for me, though.
Thanks !
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
My POLINK errors have gone, but now I get those errors:
I'll look if I can reproduce this tomorrow or such with a small code.---------------------------
TailBite Error
---------------------------
FAsm: Shared\CheckMeshCol.asm
flat assembler version 1.58
C:\Programme\PureBASIC4\TailBite\TBTemp\Functions\Shared\CheckMeshCol.asm [287]:
FDIV qword [D6]
error: undefined symbol.
Die Pipe wurde beendet.
---------------------------
OK
---------------------------
bye,
Daniel
Daniel
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I assume the 'old way' will not work anymore,El_Choni wrote:Sorry, I'm delaying the update because I'm adding default parameters support, which takes more time. Can't upload it now because the source is messed up because of that. I'll upload it as soon as it works again
Code: Select all
Procedure MyProcedure(Param1)
Procedure MyProcedure2(Param1, Param2)
Procedure MyProcedure3(Param1, Param2, Param3)
Code: Select all
Procedure MyProcedure(Param1, Param2 = 0, Param3 = 0)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).