Page 1 of 1

replace Tailbite, can be a solution?

Posted: Thu Sep 07, 2017 2:21 pm
by dobro
currently, we can compile a Libraire in DLL as well

Code: Select all


; Code "operations.dll "  a compiler en DLL
; Ces fonctions , une fois compilées en DLL ne seront pas visible par l'utilisateur (comme pour une User_lib)
ProcedureDLL Add(a,b)
      ProcedureReturn a+b
EndProcedure
ProcedureDLL sous(a,b)
      ProcedureReturn a-b
EndProcedure
ProcedureDLL div(a,b)
      ProcedureReturn a/b
EndProcedure
ProcedureDLL Mul(a,b)
      ProcedureReturn a*b
EndProcedure

PureBasic has created a "* .lib" file ("operations.lib" for my example)

it is necessary, in our listing, to use our functions, do this

Code: Select all




Import "operations.lib"
; Liste des fonctions presentes dans la DLL
      add(a,b)
      sous(a,b)
      div(a,b)
      Mul(a,b)
EndImport

; Utilisation
debug add(5,8)
debug Sous(8,2)
debug div(10,8)
debug Mul(5,8)

the problem is that in order to access our functions, we must have in the code that uses them, at the beginning of it, This :

Code: Select all

 Import "operations.lib"
; Liste des fonctions presentes dans la DLL
      add(a,b)
      sous(a,b)
      div(a,b)
      Mul(a,b)
EndImport


it just misses Purebasic the possibility to automatically insert this import, to benefit from the same advantages as TailBite
!!!!

If, at the time of compilation, the imports
could be inserted, we would have the same advantage as with Tailbite !

feasible or not feasible ?? :shock: :)

Re: replace Tailbite, can be a solution?

Posted: Thu Sep 07, 2017 2:36 pm
by falsam

Re: replace Tailbite, can be a solution?

Posted: Thu Sep 07, 2017 2:46 pm
by dobro
Arf, I had not seen
the repetition of this subject, may make things happen :lol: