Making Code into an executable program?

Answered Making Code into an executable program?

  • Tuesday, August 21, 2012 5:04 AM
     
     

    Hi All

    How do you make small basic code that you written and run in your small basic compiler into into an executable program?

    I want to save small basic code onto a disc and be able to put the disc in my dvd player and for the code to run like a normal program such microsoft word does for example, where you don't have to cut and paste the code into a compiler to run it, you just click on an icon. How do you make your code into a normal functional program that doesn't require you to see the code but only to click onto the programs icon to run it?


All Replies

  • Tuesday, August 21, 2012 10:19 AM
     
     

    Hi CyberSpaceman,

    When you run your program through the IDE (editor) by pressing the run button or F5 it will compile your code, creating an .exe only if you have previously saved your program somewhere on your computer.

  • Tuesday, August 21, 2012 1:31 PM
    Answerer
     
     
    SB automatically generates an executable (.exe) in the same folder and also the same name as your source.sb.

    To be able to run it, the environment needs to have .Net 3.5 Framework installed. And also the SmallBasicLibrary.dll must also be present in the same folder as the .exe.

    If you used any additional extensions, their .dll must also be inside the folder.

    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

  • Wednesday, August 22, 2012 4:36 AM
     
     

    I am using Window 7 operating system.

    I saved some code in my small basic compiler as a exe file in documents.
    I then went to start on my computer,found the code in documents and try to run the program, the 
    program window opened but the program did not work.

    I then downloaded from the internet  Microsoft.Net 3.5 Framework, however the
    files wouldn't extract, a message popped up on my computer which said,
    'Turn 'Windows Features on and off'
    I went to Windows Features and I tick all the boxes that it allows you to,
    I am assumming this turns on all the Window Features?, but still my window 7 operating system
    still won't extract the files from Microsoft.Net 3.5 Framework. Microsoft.Net2.5 Framework
    won't run on my computer.

    Where do you get SmallBasicLibrary.dll from? 

    Can you give me a step by step instructions(which shows every step) please on how to make small basic code
    into an executable program in windows 7? 

    Example;

    1. Go to start
    2. etc
    3. etc

    I am new to programming so therefore nothing seems obvious to me at the moment about making
    code which you run in a small basic compiler into a executable program which you run
    in windows 7 operating system like you would run microsof word 2010 in windows 7 for example.

  • Wednesday, August 22, 2012 9:08 AM
     
     Answered

    Hi CyberSpaceman,

    Here is a breif step by step.

    - Install .NET 3.5
    - Install SmallBasic V1.0 (Latest)
    - Open SmallBasic IDE (The Editor)
    - Create a simple program
    - Save program to Desktop for example as .smallbasic (The default file type)
    - Run your program within the IDE
    - Check your Desktop to find the .EXE file created
    - Run the .EXE

    You did mention your window opened when running the program but it didn't work as expected, could this be due to a mistake in your code? Post the code you was trying and we will be able to let you know if it's anything you have done wrong.

    Thanks.

  • Wednesday, August 22, 2012 12:18 PM
    Answerer
     
     Answered

    Although I don't use Win7 in my own desktop (using WinXP), I was able to install Small Basic into my mom's laptop w/ Win7 w/o installing anything else. So it seems .Net 3.5 Framework already comes pre-installed in this Windows version.

    SmallBasicLibrary.dll is automatically copied into the same folder as your .sb source code when you run it (compiled into an .exe) inside the SB's IDE.

    In short, if you want to run a compiled SB program somewhere else, you need both the generated .exe + SmallBasicLibrary.dll  (plus any additional .dll if your program uses any extensions), and make sure .Net 3.5 SP1 Framework is already properly installed in that Windows, if it's not Win7.


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

  • Wednesday, August 22, 2012 4:49 PM
     
     

    Hi All

    Thanks for all the help!

    I got it to work. If I go to start now and type in convert miles to kilometres, my program with the file name 'Convert Miles to Kilometres.exe comes up and if I click on it, the program and opens and works.

    I can write click with my mouse and create a shortcut of 'Convert Miles to Kilometres program on my desktop.

    Best Regards!

  • Wednesday, August 22, 2012 8:33 PM
    Moderator
     
     
    Please click an answer that got you going.