How to import a PB lib while using Tailbite?

Just starting out? Need help? Post your questions and find answers here.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

How to import a PB lib while using Tailbite?

Post by Mistrel »

I'm using a PB library imports in my project but I can't compile them to a tailbite library.

See this code, for example. It will not compile with Tailbite.

Code: Select all

Import "window.lib"
  CompilerIf #PB_Compiler_Unicode
    _PB_Window_ProcessEvent(a,b,c,d) As "_PB_Window_ProcessEvent_UNICODE@16"
  CompilerElse
    _PB_Window_ProcessEvent(a,b,c,d) As "_PB_Window_ProcessEvent@16"
  CompilerEndIf
  PB_Window_Icon
  PB_Window_Cursor
  PB_Window_Objects
  PB_Object_GetOrAllocateID(*Object,id)
EndImport

ProcedureDLL This()
	OpenWindow(0,0,0,320,240,"")
EndProcedure
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

I think i got it fixed, misunderstood the problem a bit :oops:

can you test the new version and report back ?

http://www.tailbite.com/downloads/TailB ... taller.exe

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

Post by Mistrel »

Yes, it's fixed! I wasn't expecting such a fast response. Thank you. :D

This may be beyond the scope of Tailbite but if I create a library that uses mapped procedures from a PB library but does not use a normal procedure the PB compiler does not include it with the compiled exe.

For example:

Code: Select all

Import "window.lib"
	; imports
EndImport

ProcedureDLL DLLFunction()
	; this function uses the imports
EndProcedure

; the compiler will error unless a command
; from the library is used somewhere in
; the program
Procedure NeverRun()
	WaitWindowEvent()
EndProcedure
I'm pretty certain that this is not the case with non-PB libraries.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

yes, i have no workaround for that :shock:

You have to ask fred :twisted:
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

If this is a PureBasic problem then just tell the linker which lib to include...

Go to "Compiler options", then write in "Linker options File:" your linker file name.

This linker file is a normal ascii file that you can create by yourself and write linker options in it like:

/implib:filename

etc.

Hope this helps.

(sorry if I didn't understand what you are after)
Post Reply