Hi, I have this code:
If TargetWindows Then
Const kCFITSIO = “cfitsio.dll”
ElseIf TargetLinux Then
Const kCFITSIO = “libcfitsio.so”
ElseIf TargetMacOS Then
Const kCFITSIO = “libcfitsio.dylib”
End If
and then I’m calling a function from within the sharedlib/dll like this:
Soft Declare Function ffopen Lib kCFITSIO (ByRef fptr As Ptr, filename As CString, mode As Int32, ByRef status As Int32) As Int32
XOJO won’t compile this telling me that the const kCFITSIO is the wrong type expected.
If I ignore the If Target loop and just declare
Const kCFITSIO = “cfitsio.dll”
directly for each platform, it’s fine..
Why won’t this compile as a single codebase (because I have to each build individually otherwise)?
Thanks hivemind!
Jason.
