Re: PowerBASIC
- From: "Nobody" <nobody@xxxxxxxxxx>
- Date: Wed, 24 Jun 2009 14:35:09 -0400
"Pete B" <petescastle@xxxxxxxxxxx> wrote in message
news:OKT4X9O9JHA.1880@xxxxxxxxxxxxxxxxxxxxxxx
Does the compiler package include documentation?
You need to download it seprately under "Documents" heading below, which is
a CHM file.
http://www.freebasic.net/index.php/download
If you don't see anything in the help, right click the CHM file and look for
"Unblock" button. This is a feature of XP+SP2 and after. See this picture to
see where this button is hidden:
http://geekswithblogs.net/images/geekswithblogs_net/evjen/65/o_chmfiles.gif
Unfortuantly the OS doesn't tell you the file is blocked, and the button is
hidden for normal and unblocked files, so most people don't know it's there.
I am a little confused, is this a Windows compiler or a DOS compiler? I
did not see any real documentation about it on the links you listed. I
saw the list of features etc. but that is not the same as a manual or
online documentation. I get the feeling it is more a QB-type package than
for Windows. I downloaded the compiler but I don't want to bother
installing it if it does not have good documentation.
It's for DOS/Windows 32 bit/Linux. 64-Bit support will be added later. The
compiler itself is command line only. To download the Windows version, under
heading "Binaries", click on the icon to the right of "Windows".
You need to install the following IDE after you install the compiler if you
want easy to use interface, but don't expect something as simple to use as
VB, especially for GUI applications. I haven't used GTK or Qt, so I don't
know how to use them.
http://sourceforge.net/projects/fbedit/
When you install the compiler, it also install several samples here:
C:\Program Files\FreeBASIC\examples
Each sample describes how you can compile it. You basically click on
FreeBasic shortcut on the desktop, this brings a Command Prompt window with
the path to the compiler is set in the Path environment variable, so you
don't have to enter the path to the compiler. For example, start FreeBasic
shortcut and type the following(Copy & Paste from the control menu):
cd C:\Program Files\FreeBASIC\examples\dll\VB
fbc fbside.bas -dll
This creates a dll that you can use in VB6. There is a file in the same
folder called "vbside.bas" that illustrates how to use that DLL in VB6. The
sample shows how to create a string and return it to VB. There is a simpler
example in "dll" folder, but you have to use <extern "windows-ms"> so VB6
can use it. Here is a full example, only 5 lines in the entire BAS file:
Extern "windows-ms"
Function AddNumbers(ByVal val1 As Integer, ByVal val2 As Integer) As Integer
export
Function = val1 + val2
End Function
End Extern
In VB side, you declare it like this:
Declare Function AddNumbers Lib "test.dll" (ByVal val1 As Long, ByVal val2
As Long) As Long
Integer in FreeBasic is 32-bit, Long is 32 or 64 bit depending on the
platform, LongInt is 64-Bit, Short is 16-bit, Byte is 8 Bits. There is
unsigned version of all of these.
.
- Follow-Ups:
- Re: PowerBASIC
- From: Nobody
- Re: PowerBASIC
- References:
- PowerBASIC
- From: Pete B
- Re: PowerBASIC
- From: Nobody
- Re: PowerBASIC
- From: Pete B
- PowerBASIC
- Prev by Date: Re: Cross Multiplication (Suggestions?)
- Next by Date: Processing video images and writing back partial set
- Previous by thread: Re: PowerBASIC
- Next by thread: Re: PowerBASIC
- Index(es):