How to compile a small basic program?

Started by codeWrapped, February 16, 2024, 18:37:58

Previous topic - Next topic

codeWrapped

Ok I am completely new here  :D

I am wondering how you can compile a console .bas program to .exe via command-line? I am on a PC with Windows 10 and can run .bas programs. I did find the "Deployment" tool someone on here wrote and it did it's thing but I had a window with black screen when clicking on the .exe.

Any help appreciated.

Thank you in advance

Qube

If it's a console based .exe and you clicked / ran the .exe from Explorer then you may have just seen a flicker of a console window. Did you launch terminal and try to run the .exe from there?

If any of the above is rubbish info then did it show any errors or messages?. I'm sure with more info about the whole process you went through then we could help.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Pakz

#2
What basic programming language is it? And the 'compiler'(deployment) tool name?

I was looking at how to create a exe from javascript yesterday, and it appears there is a javascript compiler built in windows that can also be used to create executables from any file. This also through the console. Not tried it yet though.

edit: I saw the title and that it is small basic. sorry, just got up and on my first coffee.

codeWrapped

#3
Hello Pakz,
I am using the smallbasic language from here: https://smallbasic.github.io/
and the Distribution Tool here: https://smallbasic.github.io/pages/distributiontool.html

LOL ... NP

Thank you,

Pakz

Reading from the deployment tool info page. It mentions to include any files the .bas file uses, into the folder where it is compiled from. That might cause a black screen if assets could not be loaded from the folder. Does it not work with anything it compiles? A simple 'hello world' console example for instance?

I have not installed it myself at the moment. 

codeWrapped

From what I can tell a simple console program doesn't work as well? The window just opens and closes right away. I added a real long for loop, but a better test would a key input.


codeWrapped

I added a key input and when run in interpreted mode the console window stays open. When I compile the program and double click on it the window just flashes, closes right away?

codeWrapped

So is there a compiler for small basic? I am starting to think there isn't one. Which would be a shame!  

codeWrapped

I found my answer. It is "free Basic" for me.

So leads me to my next question. As I am switching over to free Basic is this board open to all variants of Basic or just Small Basic? I have seen some post on other Basics but wanted to ask to be sure.

Pakz

Any programming language is good here. Anything computer related or fun stuff :) There is also a couple of nice Basic groups on Facebook that I follow there. They sometimes post some very nice short listings.

I have no idea what the problem with small basic could be btw.