Lib

Specifies the library where a sub or function can be found as part of a 
declaration

Syntax
	KeyPgDeclareDeclare { KeyPgSubSub | KeyPgFunctionFunction } proc_name Lib "libname" [ KeyPgAliasAlias "symbol_name" 
	] ( arguments list ) KeyPgAsAs return_type

	KeyPgExternBlockExtern "mangling" lib "libname"
		declarative statements
	end KeyPgExternBlockExtern

	KeyPgTypeType T
		KeyPgAsAs KeyPgIntegerInteger dummy
		KeyPgDeclareDeclare KeyPgConstructorConstructor Lib "libname" [ KeyPgAliasAlias "symbol_name" ] ( arguments 
		list )
	end KeyPgTypeType

Description
	In KeyPgSubSub or KeyPgFunction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 KeyPgInclib#Inclib "Libname" or CompilerOptl-l libname had been used.

	Lib can also be used with KeyPgExternBlock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
	* New to FreeBASIC

See also
	* KeyPgDeclareDeclare
	* KeyPgInclib#inclib

