View Full Version : Embed thinBasic as scripting language to visual studio
ReneMiner
24-06-2020, 22:30
I stumbled across some instructions how to implement scripting languages into ms visual studio and perhaps that could be more interesting than creating dlls and wrap functions to have them accessible by directly accessing it and use the ease and logical rules following syntax of thinBasic to get a stubborn fat old dog to move and listen - instead to lay around lazy and only to fart if it wants an update...
maybe can this http://www.voidcn.com/article/p-wqhdgtzz-yw.html work with tB? I fear i do not have all the required sources to try
DirectuX
25-06-2020, 17:19
That's the interesting part :
Configuring Visual Studio. We need to configure Visual Studio to let it know where and what libraries and header files to look for when compiling our project. Configuring Visual Studio after you have Lua library file is really simple.
Open up Visual Studio and create a new project. (File->New->Project)
Select an Empty Project and give it any name.
Go to Projects->”Your project name” Settings.
Navigate to Configuration Properties -> C/C++ -> General and under Additional Include Directories type the location to your src folder of your Lua directory.Alternatively, you could have copied lua.h, lua.lib, lua.exe in single folder but I have left managing your folders up to you
Again, under Configuration Properties->Linker->General, Additional Library Directories copy the same src location.
In the same Linker section go to Input and add lua5.2.lib under “Additional Dependencies”.
Setup the project folder. We are not quite done yet. One last step before you can start embedding your Lua library is to copy “lua.dll” file that was generated in the “src” directory and paste it in your project folders. This file must be in the same folder where your program’s executable file loads, usually in Debug folder.
This is a decades requested feature, but look here:
Here a PowerBasic pirce of code of how to execute a thinBasic script from a PB program:
https://www.thinbasic.com/community/showthread.php?12242-Integrating-thinBasic-with-NeoBook&p=90011&viewfull=1#post90011
http://www.thinbasic.com/community/showthread.php?12042-Embedded-supported-or-not
http://www.thinbasic.com/community/project.php?issueid=185
can't read all these articles with half damaged eye :cry:
there is also BINT32 which is (i guess) the Grandmother of thinbasic i have found it in my hard disk
about BINT32:
https://forum.powerbasic.com/forum/user-to-user-discussions/third-party-addons/29071-bint32-source-code-released
https://forum.powerbasic.com/forum/user-to-user-discussions/powerbasic-for-windows/54955-to-eros-olmi-bint32-question
https://forum.powerbasic.com/forum/user-to-user-discussions/powerbasic-for-windows/39900-scripting-a-pb-app-dll-attention-eros-olmi-or-florent-heyworth