Felix can now do C++ only compilation with static linkage (i.e. targetting
an executable).

The flags may change but here's an example:

// fred.cpp ----------------------------------
#include <stdio.h>
#include "joe.hpp"

int main()
{
  printf ("This is fred:main2()\n");
  joe();
  david ("main");
}

// joe.hpp ------------------------------------
#include <stdio.h>
extern void joe();
inline void david(char const *x) { printf("David inline %s\n", x); }

// joe.cpp ---------------------------------
#include <stdio.h>
#include "joe.hpp"
void joe()
{
  printf("joe-subroutine2\n");
  david("joe");
}

~/felix>build/release/host/bin/flx --test=build/release  --static --c++ joe.cpp 
fred.cpp
This is fred:main2()
joe-subroutine2
David inline joe
David inline main

Here we have two C++ body files and a shared header. Touching any one
triggers a recompile/link as required. The *.o files live next to the *.cpp 
files.
You can of course include *.o files in the link, as well as any libraries.
The executable goes in the Felix cache as usual, unless you tell it otherwise.

There's no Felix involved. No thunk. It's plain C++.
Run with half a scripting harness.

Some more work should allow producing dynamic link libraries and
static link libraries (archives) instead of executables. All with automatic
source code dependency checking.

There's also a new switch -- so you can do this:

~/felix>build/release/host/bin/flx --test=build/release  --static --c++ joe.cpp 
fred.cpp -- xx --aa

which passes the words after the -- as arguments. This is needed here to stop 
the
parser looking for a Felix file (or a name without an extension).


--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to