How to embed SmallBASIC into C++?

Started by bprlhe, August 04, 2023, 12:04:34

Previous topic - Next topic

bprlhe

Please give me example code, too. Thank you :)

chrisws

This would be possible, but there's currently nothing setup ready to go.

You could invoke the command line version from your c++ program.

A properly integrated way would be to build the sources as a library to import. 

There would need to be a different "platform" setup to build the code in this way, and then some interface you'd need to implement for various functions.

bplus

Or you could just use QB64 / QB64pe then you have your Basic translated to C++ and compiled to boot!

What could be more handy than that? Full documentation? sure QB64pe has that too :)

1 person likes this

bprlhe

#3
Quote from: bplus on August 05, 2023, 16:36:44Or you could just use QB64 / QB64pe then you have your Basic translated to C++ and compiled to boot!

What could be more handy than that? Full documentation? sure QB64pe has that too :)


QB64/QB64pe is not suitable for the kind of programs I want to write. The programs will be written in C++ with SmallBASIC embedded to provide scripting capability. People normally use Lua for this purpose.