///////////////////////////
// fred.cpp
#include <iostream>
int main()
{
::std::cout << "Hello World of Fred" << ::std::endl;
return 0;
}
///////////////////////////
// tcxx.flx
include "src/tools/toolchain_clang_config";
include "src/tools/toolchain_interface";
var toolchain-maker =
Dynlink::load-plugin-func1 [toolchain_t,clang_config_t]
(
dll-name="src/tools/toolchain_clang_osx",
setup-str="",
entry-point="toolchain_clang_osx"
)
;
var config =
(
header_search_dirs= Empty[string],
macros= Empty[string],
library_search_dirs= Empty[string],
dynamic_libraries= Empty[string],
static_libraries= Empty[string],
debugln = println[string]
)
;
var toolchain = toolchain-maker config;
println$ #(toolchain.whatami);
var result = toolchain.cxx_static_object_compiler (src="fred.cpp",
dst="fred.o");
println$ "Compiler result " + str result;
result = toolchain.executable_linker(srcs=list[string]("fred.o"), dst="fred");
println$ "Linker result " + str result;
//////////////////////
~/felix>flx --test=build/release -c --force src/tools/toolchain_clang_osx.flx
&& flx --test=build/release tcxx
~/felix>./fred
Hello World of Fred
--
john skaller
[email protected]
http://felix-lang.org
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language