C/C++ Question [SOLVED] Possibility to convert B4R BAS Module to a Library

rwblinn

Well-Known Member
Licensed User
Longtime User
SOLVED by creating a b4x library - see post #3.

Developed a B4R BAS module (GPRMC.bas) - Parse GPS NMEA-0183 message format RMC to fields with additional subs Distance & Bearing.
Instead including the module into various programs, thinking of converting to a B4R library (so basically a class) ... BUT how?
Options
1. Possibility to create, from the B4R IDE a B4R library (like in B4J) with h, cpp and xml file.

2. Take the B4R generated src files b4r_gprmc.h and .cpp and create the library rGPRMC with rGPRMC.h,.cpp with its public functions pointing to b4r_gprmc.h and using b4r_gprmc.cpp
But think hard to maintain ... although nice a challenge which could be applied to any other modules.

... more?

This is just a thought.
 
Last edited:

rwblinn

Well-Known Member
Licensed User
Longtime User
Good hint - was (still) thinking conventional way.

Steps taken to create the library and place in the B4R Additional Libries Folder:

1. Create GPRMC.bas

3. Create manifest.txt
Version=1.00
Supported Platforms=B4R
DependsOn=rRandomAccessFile

3. Create rGPRMC.b4xlib in B4R Additional Libraries Folder
Packed rGPRMC.b4xlib using ZIP archiver with files:
rGPRMC.bas
manifest.txt

4. Created rGPRMC.xml in B4R Additional Libraries Folder using the B4J tool b4xlib2XML

5. Created B4R test program with the library rGPRMC
Works fine.

6. Will share rGPRMC.b4xlib soon in the B4R libraries forum

Thanks for Help.

Note: Post #1 attachment removed.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…