[futurebasic] Hello World

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Sat, 5 Jan 2008 21:49:05 -0500
John asked:

> I would like to create a simple program and use FBtoC and xcode to
> make a universal binary
> For example, After downloading FBtoC , I wrote a simple program in FB
> as follows:
> window 1
>   print "Hello, world!"
> do
> handleevents
> until gFBQuit


Welcome to FB!

Why not let FBtoC do the heavy lifting and create the Universal  
Binary for you?

It's simply a matter of setting your desired output architecture in  
FBtoC's preferences. (BTW: You can compile a Universal or Intel app  
on a PPC machine and vice versa).

Like Xcode, FBtoC is a front end to the gcc compiler. If you want to  
run FBtoC's C output code in Xcode, your would need to add the  
appropriate FBtoC headers from its "build_temp" and "build_goodies"  
folders to the Xcode project. However, that defeats the purpose of  
FBtoC-- the concept of inputing BASIC code and outputting PPC, Intel  
or Universal Binary applications.

Below are two screenshots-- one of the FBtoC preferences window, and  
one of your Hello World code compiled as a Universal Binary from  
within FBtoC.