Results 1 to 5 of 5

Thread: FreeBasic SDK: working full source code example

  1. #1
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    FreeBasic SDK: working full source code example

    Hi all,

    please find here attached first full source code example module developed with FreeBasic (continuation from this post: http://community.thinbasic.com/index.php?topic=1208.0 ).

    How to work with FreeBasic.
    First, here I assume FreeBasic version 0.18.1 Beta is installed into the base directory "C:\FreeBasic\" If not, it should be work in any case providing the IDE is aware of it.
    Second I assume FbEdit IDE is installed into "C:\FreeBasic\FbEdit\" directory. If not it should work the same providing that FbEdit is the default application to open .fbp files

    Steps:
    • install FreeBasic downloading from http://www.freebasic.net/
    • install FbEdit downloading from http://www.radasm.com/fbedit/ Open ZIP file and extract all files (maintaining directory structure under "C:\FreeBasic\". You should have something like "C:\FreeBasic\FbEdit\" with all files inside.
    • link .fbp files to be opened by "C:\FreeBasic\FbEdit\FbEdit.exe"

    If all wend fine, you have now FreeBasic up and running.

    How to work with thinBasic modules using FreeBasic.
    • Download attached zip file and unzip it into a new directory
    • double click on "thinBasic_FBGFX.fbp" and if all was OK in previous setup you should have the project open into FbEdit. thinBasic_FBGFX.bas and thinCore.bi should be open in the editor
    • have a look at the code. Structure works more or less the same as in Power Basic
    • to compile the module just press F5 or menu Make/Compile


    List of included files:
    • libthinCore.dll.a
      Static interface library needed by FreeBasic compiler in order to link to thinCore.dll (main thinBasic engine) at runtime
    • Test_FBGFX_Screen.tBasic
      Sample script
    • Test_FBGFX_ScreenRes.tBasic
      Sample script
    • thinBasic_FBGFX.bas
      Module source code
    • thinBasic_FBGFX.dll
      Module compiled code
    • thinBasic_FBGFX.fbp
      FbEdit project file. It contains all the info needed to manage a thinBasic module project under FreeBasic
    • thinCore.bi
      Interface file to be included into every module source code. IT IS UNDER HEAVY CHANGE so expect this file to be quite different in next release. Leave this file as is and look at it just for reference


    _________________________________________________
    If all went fine you should be able to compile at first try. If not, report problems here.

    Also consider we are working on this module interface. Many changes will be introduced if we will see some interest. Some part are still missing like using script variables passed BYREF but it will be quite easy to introduce and we will do it as time will permit.

    Tell us what you think and what you need and we will do our best to make it real.

    Ciao
    Eros
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,139
    Rep Power
    733

    Re: FreeBasic SDK: working full source code example

    Hi Eros,

    I tried to compile with FB and it works good.
    So far no problems, just in thinBASIC.BI there is on second line:
    ' File NAME : thinCore.inc
    I am sure you recoginize how serious is this - it affects Earth stability, makes Sun explode and you will be transported to prison for crimes against file extensions ;D


    Thanks a lot,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: working full source code example

    Thanks Petr, attach fixed.

    thinCore.bi will change a lot. There is a lot of commented code (Power Basic version) that will be removed and/or substituted by native FreeBasic code.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    68
    Posts
    3,869
    Rep Power
    404

    Re: FreeBasic SDK: working full source code example

    Eros, I didn't test it as freebasic is not installed, but I think support for freeBasic is a great idea. It already looks like a great basic and will just get better as work continues on it. Depending on what happens in powerBasic in the future, I think it is nice to have freeBasic as an option and direction to move to. So thanks for the effort and steps taken!!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #5

    Re: FreeBasic SDK: working full source code example

    I got curious about FreeBasic so a while ago I downloaded it and fbedit. Later today I'll install it and get to check it out. I also got the thinbasic_fbgfx.zip and will check out this also.

    I've got new toys to play with!!!

    Thanks
    Sandy

Similar Threads

  1. Another open source wrapper for FreeBASIC
    By maxim in forum Irrlicht
    Replies: 3
    Last Post: 24-06-2011, 08:03

Members who have read this thread: 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •