Specifies the library where a sub or function can be found as part of a declaration
Syntax
Description
In
Sub or
Function declarations, and also in class method declarations (including constructors and destructors),
Lib indicates the library containing the function. Libraries specified in this way are linked in as if
#Inclib "Libname" or
-l libname had been used.
Lib can also be used with
Extern ... End Extern Blocks to specifiy a
Lib for all declarations inside.
Example
'' mydll.bas
'' compile with:
'' fbc -dll mydll.bas
Public Function GetValue() As Integer Export
Function = &h1234
End Function
Declare Function GetValue Lib "mydll" () As Integer
Print "GetValue = &h"; Hex(GetValue())
' Expected Output :
' GetValue = &h1234
Differences from QB
See also