Skip to content

Commit

Permalink
reexport swicli from swicffi
Browse files Browse the repository at this point in the history
  • Loading branch information
DouglasRMiles committed Nov 25, 2014
1 parent b258636 commit f88e94d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
26 changes: 26 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,33 @@ pl/library/
}}}

== Running / Examples ==
{{{

root@titan:~# swipl
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.1.26)
Copyright (c) 1990-2014 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

?- use_module(library(swicffi)).
SetupProlog

Cannot install hook ThreadExit to Mono
Swicli.Library.Embedded.install suceeded
true.

?- cli_get_dll('libc.so.6',DLL),cli_call(DLL,printf,["I have been clicked %d times\n", 2],O).
I have been clicked 2 times
DLL = @'C#666',
O = @void.

?-


}}}
{{{
[root@titan bin]# . mono_sysvars.sh
[root@titan bin]# swipl
Expand Down
8 changes: 8 additions & 0 deletions mono_sysvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_10/
export LD_LIBRARY_PATH=.:$SWI_HOME_DIR/lib:$COGBOT_DIR:$SWI_HOME_DIR/lib/amd64:$JAVA_HOME/jre/lib/amd64/jli:$SWI_HOME_DIR/lib/x86_64-linux:$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server:/usr/lib64:/usr/local/lib64:/usr/lib:/usr/local/lib

export MONO_PATH=.:/usr/lib/ikvm:/usr/lib64/mono/4.0:$LD_LIBRARY_PATH


export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_10
export JAVA_PATH=/usr/java/latest
export PATH=/root/catkin_ws/devel/bin:/opt/ros/indigo/bin:/root/ros_catkin_ws/install_isolated/bin:/usr/java/latest/jre/bin:/usr/java/latest/bin:/usr/lib/qt-3.3/bin:/development/opensim4opencog/bin:/usr/lib/mozart/bin:/root/.nix-profile/bin:/nix/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/opt/JProbe_7.0.3/bin:/jet6.4-eval/bin:/usr/lib/jvm/jdk1.6.0_10//bin:/usr/java/latest/bin:/usr/java/latest/jre/bin:/usr/local/ec2-api-tools-1.3-19403/bin:/usr/lib64/ccache:/opt/acl/acl81.64:/usr/local/lib/acl80.64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/latest/bin:/usr/local/maven-2.0/bin:/opt/slickedit/bin:/root/bin

export LD_LIBRARY_PATH=.:/usr/lib/swi-prolog/lib:/mnt/enki/development/opensim4opencog/bin:/usr/lib/swi-prolog/lib/amd64:/usr/lib/jvm/jdk1.6.0_10//jre/lib/amd64/jli:/usr/lib/swi-prolog/lib/x86_64-linux:/usr/lib/jvm/jdk1.6.0_10/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_10//jre/lib/amd64/server:/usr/lib64:/usr/local/lib64:/usr/lib:/usr/local/lib

7 changes: 3 additions & 4 deletions swicffi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
% Douglas Miles
*/

:-module(swicffi,[install_cffi/2,cffi_tests/0,to_forms/2,load_forms/1]).

:- use_module(swicli).
:- module(swicffi,[install_cffi/2,cffi_tests/0,to_forms/2,load_forms/1]).
:- reexport(swicli).


:- style_check(-singleton).
Expand Down Expand Up @@ -280,7 +279,7 @@
% work!
cffi_test :- cli_get_dll('libc.so.6',DLL),cli_call(DLL,printf,["I have been clicked %d times", 2],O).
% fixing
cffi_test :- cli_get_dll('libc',DLL),cli_call(DLL,printf,["I have been clicked %d times", 2],O).
cffi_test :- cli_get_dll('libc.so',DLL),cli_call(DLL,printf,["I have been clicked %d times", 2],O).
% not impl yet
cffi_test :- install_cffi('snake-tail','cffi-tests/swi-prolog.cffi'),module(swicffi),prolog.

Expand Down

0 comments on commit f88e94d

Please sign in to comment.