Difference between revisions of "BuildingTheFactJniLibrary"
(→Linking the JNI Library in os x.) |
(→Handling Problems with FaCT++ not Finding Libraries) |
||
Line 1: | Line 1: | ||
= Handling Problems with FaCT++ not Finding Libraries = | = Handling Problems with FaCT++ not Finding Libraries = | ||
+ | == The C++ compile == | ||
'''In Progress...''' | '''In Progress...''' | ||
Line 18: | Line 19: | ||
Now much of the building progresses fine. But it seems that building the jnilibrary does not work on most machines. So here are some machine specific options for how to finish the build. | Now much of the building progresses fine. But it seems that building the jnilibrary does not work on most machines. So here are some machine specific options for how to finish the build. | ||
− | == Linking the JNI Library in os x. == | + | === Linking the JNI Library in os x. === |
The commands | The commands | ||
Line 27: | Line 28: | ||
compile but don't work at runtime. | compile but don't work at runtime. | ||
+ | |||
+ | == The Java Compile == | ||
+ | |||
+ | Set the owlapi variable to the location of the owlapi jar file, e.g. | ||
+ | owlapi=~/dev/workspaces/protege4/owleditor/plugins/org.semanticweb.owl.owlapi/lib/owlapi-bin.jar | ||
+ | Then the command line | ||
+ | javac -cp $owlapi -d classes -g `find FaCT++.Java -name "*.java"` | ||
+ | almost works. | ||
== Troubleshooting == | == Troubleshooting == | ||
[http://xerces.apache.org/xerces-c The xerces C Library Home Page] | [http://xerces.apache.org/xerces-c The xerces C Library Home Page] |
Revision as of 15:20, April 25, 2008
Contents
Handling Problems with FaCT++ not Finding Libraries
The C++ compile
In Progress...
Note that if you do this on a Mac then Xcode 2.2 or greater is recommended in order to get a universal binary.
First checkout FaCT++ with the command line call:
svn checkout http://factplusplus.googlecode.com/svn/trunk/ factplusplus.
We now need to edit the Makefile.include to use the options associated with the correct version of gcc. First we find the version of gcc with the command line
gcc -v
On my linux machine the result was
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)
So I modified the Makefile.include so that the GENERAL_DEFINES were
GENERAL_DEFINES = $(GCC_OPT_OPT) $(GCC_34_OPT) $(ALL_DEF)
Now much of the building progresses fine. But it seems that building the jnilibrary does not work on most machines. So here are some machine specific options for how to finish the build.
Linking the JNI Library in os x.
The commands
cd FaCT++.JNI g++ -dynamiclib -framework JavaVM -I/System/Library/Frameworks/JavaVM.framework/Headers \ obj/FaCTPlusPlus.o ../Kernel/obj/*.o ../Bdd/obj/*.o -o obj/FaCTPlusPlus.jnilib
compile but don't work at runtime.
The Java Compile
Set the owlapi variable to the location of the owlapi jar file, e.g.
owlapi=~/dev/workspaces/protege4/owleditor/plugins/org.semanticweb.owl.owlapi/lib/owlapi-bin.jar
Then the command line
javac -cp $owlapi -d classes -g `find FaCT++.Java -name "*.java"`
almost works.