Re: Using Rake to compile FreeBASIC code



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).


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.

[snip]
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/.


.



Relevant Pages

  • Re: Linux 2.6.30.2: does not boot
    ... Yes, as Marcel Beister pointed, it resulted some binutils bug. ... Wolfgang hasn't actually tried to compile without the -fno-strict-overflow ... flag yet, and maybe his hang is the same binutils bug. ... maybe I missed some gcc flag confirmation that wasn't cc'd to ...
    (Linux-Kernel)
  • RE: Compile error on RH 9
    ... I removed the -DSYSV flag, ... Compile error on RH 9 ... Anyone have a clue why there's a parse error on that line? ... -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: RfD -- FVALUE vsn 2.0
    ... flag, and then execute or compile the action of the name. ... No immediate. ... CELLS offset! ... STATE @ IF COMPILE, EXIT THEN EXECUTE; ...
    (comp.lang.forth)
  • Re: openssh-3.8p1 compile problem
    ... Did you compiled it with -static flag? ... "Alexander Latenko" ha scritto nel messaggio ... > I'm trying to compile openssh-3.8p1 with static flag ... >: undefined reference to `__res_query' ...
    (comp.security.ssh)

Loading