05-26-2024, 04:46 PM
It's pretty easy:
1. Place your C/C++ functions in a *.h file
2. On the QB64 side bind your functions using a DECLARE LIBRARY block by referencing the *.h file (important: name the file without .h extension)
3. Use the functions on the QB64 as per the declarations.
If you get compiler errors, try to fix it on the C/C++ side, most issues arise with incorrect/unknown typing or namespaces. So try to limit yourself to <stdint.h> types and add namespace prefixes to functions when required (eg. std :: somefunction).
For an easy example see my RegEx implementation.
More stuff to examine in my Libraries collection, especially the Base64, Md5, Des56, Sha2 and standard library stuff.
1. Place your C/C++ functions in a *.h file
2. On the QB64 side bind your functions using a DECLARE LIBRARY block by referencing the *.h file (important: name the file without .h extension)
3. Use the functions on the QB64 as per the declarations.
If you get compiler errors, try to fix it on the C/C++ side, most issues arise with incorrect/unknown typing or namespaces. So try to limit yourself to <stdint.h> types and add namespace prefixes to functions when required (eg. std :: somefunction).
For an easy example see my RegEx implementation.
More stuff to examine in my Libraries collection, especially the Base64, Md5, Des56, Sha2 and standard library stuff.
GuiTools, Blankers & other Projects:
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23