This is the code:
Code: Select all
' Declaration of the function inside the LIB
Declare Function CLDESIGN_PRINTAREA(ByVal DoubleRow As Integer = 0, ByVal SquareExtend As String = ""))As Integer
'This is little code that replace the big function
Function CLDESIGN_PRINTAREA( ByVal DoubleRow As Integer = 0, ByVal SquareExtend As String = "")As Integer export
Dim As Integer Status = 0, Extension = 0
If Len(SquareExtend) > 0 Then
Extension = 1
Status = 0
Else
Status = 1
End If
Return Status
End Function
'The class where I Have to use the function
type Square
private:
Dim As Integer XResolution = 640, YResolution = 400 ' Default DOS Resolution for command line
public:
Static CLDE_PRINTAREA As Function (ByVal DoubleRow As Integer = 0, ByVal SquareExtend As String = ""))As Integer
End Type
' Here I assign the pointer
Square.CLDE_PRINTAREA=@CLDESIGN_PRINTAREA() 'Assign pointer to a function
And when i compile it give me this message
I apologize if I got confused with something trivial but I've been working on a PHP project for 7 months and getting back into FreeBASIC is proving more difficult than I thought. Among my old projects I can't find anything that's relevant.
ld.exe: test.o:fake:(.rdata$.refptr._ZN6SQUARE15CLDE_PRINTAREA$E[.refptr._ZN6SQUARE15CLDE_PRINTAREA$E]+0x0): undefined reference to `SQUARE::CLDE_PRINTAREA$'