It seems there is problem linking the procedure addresses between Oxygen and ThinBASIC
Hi,
I think this code worked fine before, but now I get zeros for both code pointers. I am not sure whether it is issue in Oxygen or ThinBASIC, but I am posting it here to not forget about it:
#MINVERSION 1.8.9.0
Uses "Oxygen"
DWord oxySumTwo, oxyFinish
String callbackCode
callbackCode = "
basic
Function Oxygen_SumTwo( Byval a As Long, Byval b As Long) As Long At #oxySumTwo
return a+b
End Function
Sub Oxygen_Finish() At #oxyFinish
terminate
End Sub
"
O2_BASIC callbackCode
If Len(O2_ERROR) Then
MsgBox 0, O2_ERROR, "JIT compilation failed"
Else
O2_EXEC
MsgBox 0, "oxySumTwo: " + oxySumTwo + $CRLF +
"oxyFinish: " + oxyFinish,
"The values should be non-zero"
End If