C/C++ Question Error accessing B4XLib Process Global Type Declaration

rwblinn

Well-Known Member
Licensed User
Longtime User
In the B4X Library GPRMC to be used for B4R declared a Type, like
B4X:
Sub Process_Globals
    Type TDate (Stamp As Double, Day As Int, Month As Int, Year As Int)
    Public DateStamp As TDate

When using the b4xlib in a B4R program, the type members are not visible with error:
B4X:
Main - 56: Unknown type: TDate<br />Are you missing a library reference?
The b4xlib object is declared as
B4X:
Private gpsRMC As GPRMC

Expected accessing the Type as
B4X:
gpsRMC.DateStamp.Day ...

All members are visible, except the Type ones.

Any hint how to access the type members?

NOTE: When using the library BAS file as a module, the type is accessible.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The b4xlib object is declared as
You don't need to declare anything. The code from the b4xlib is added to your project exactly like any other code.

1625145974832.png
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Thanks for testing and the hint.

Found out following:
rGPRMC.b4xlib in ..\B4R Additional Libraries folder = GPRMC.TimeStamp.Hour ... visible.
rGPRMC.b4xlib in ..\B4R Additional Libraries folder\rGPRMC = GPRMC.TimeStamp.Hour ... NOT visible.

So have moved rGPRMC.b4xlib from its subfolder ..\B4R Additional Libraries folder\rGPRMC\ to ..\B4R Additional Libraries folder and it works.
 
Top