Re: Using Rake to compile FreeBASIC code
- From: Luis Lavena <luislavena@xxxxxxxxx>
- Date: Tue, 21 Mar 2006 16:21:08 +0900
Jim Weirich wrote:
Luis Lavena wrote:
Maybe the subject sound strange, but FreeBASIC
(http://www.freebasic.net) offer us native assembly-linked code that we
currently use to drive a few special purpose dlls on windows.
Folling Rake Tutorial, we tried to recreate it for fb (instead of c).
Cool!
In one of our projects, the business logic is driven by a embedded lua
interpreter (called and extended from FB), that way we provide simpler
access to change logic without need of recompiling.
We are using RoR and wanted to take advantage of Rake for our libraries
too (we are tired of batch files!)
Ok, the problem (as I understand it) is that a main module must be
specially compiled. Only one main module can be in a executable. And
modules that are main for one program need to be non-main for other
executables.
Does that sound right?
Yes, that is correct, please excuse my bad grammar (self learned
english, spanish native speaker).
[snip]
I approached with the thought that modules that could be main must be
compiled twice, once normally for use as a library, and once with the
main flag to be used as the main program.
Just a couple notes. I don't have FreeBasic so I couldn't actually
compile anything. I just simulated the fbc program with a simple script
that just touched the output files. This means I may have gotten some
of the details wrong, especially the flags that are sent to the compile.
In particular, double check the -m flag. I assume that it wants the
name of the module without any directory name or file extension.
Here's my version ... let me know of this works for you:
I really don't know HOW you do this (trying to figure out the new rule
you added) but it works.
Yeah, copy & paste, run it and build everything without problems!
We just used '**/*.bas' as example to include every module in the list,
doing that, for the "test" project, stub get compiled twice: one as
module, one as main.
But that is because we used magic wildcards, when in real-life,
wouldn't.
Wanted to thank you for the time you took to answer me, and provide this
helpful solution.
Still learning ruby (a few months playing with it) but now I want to run
SWIG on the ruby headers to create compatible FB includes and create
native access (?) to freebasic (btw, its cross-platform win, linux, dos)
Also we created, unit testing ala UnitTest for FreeBASIC, TDD to the
max! ;-)
Regards and thank you again,
Luis
--
Posted via http://www.ruby-forum.com/.
.
- References:
- Using Rake to compile FreeBASIC code
- From: Luis Lavena
- Re: Using Rake to compile FreeBASIC code
- From: Jim Weirich
- Using Rake to compile FreeBASIC code
- Prev by Date: Re: IDE suggestions
- Next by Date: Re: iterate chars in a string
- Previous by thread: Re: Using Rake to compile FreeBASIC code
- Next by thread: Re: Using Rake to compile FreeBASIC code
- Index(es):
Relevant Pages
|
Loading