Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C++ in QB?
#4
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.
Reply


Messages In This Thread
C++ in QB? - by CletusSnow - 05-26-2024, 04:11 PM
RE: C++ in QB? - by BSpinoza - 05-26-2024, 04:19 PM
RE: C++ in QB? - by CletusSnow - 05-26-2024, 04:39 PM
RE: C++ in QB? - by RhoSigma - 05-26-2024, 04:46 PM
RE: C++ in QB? - by CletusSnow - 05-26-2024, 05:29 PM
RE: C++ in QB? - by grymmjack - 05-27-2024, 03:44 PM
RE: C++ in QB? - by Kernelpanic - 05-26-2024, 05:49 PM



Users browsing this thread: 1 Guest(s)