GENERAL:
Im programming a face detection Programm with OpenCV and I want to get it working on other Computers without a OpenCV install. My Programm is for Mac OS X, Linux and Windows.
WHAT I ALREADY TRIED:
I tried to compile it on my first Mac, then I copied to my second mac, but I always get Errors, because there are absolute paths (i think) that pointing to my Desktop (Where i compiled the Library on my first mac). I asked my teacher if it is possible to rewrite these absolute paths to relative path, but he said that it is not possible. Now im here :)
CODE: (Nice Formatting xD)
public static void loadOpenCVLibrary() {
//all opencv libs must be copyed to OpenCV_lib in the project workspace
File folder = new File(directory+seperator+"System"+seperator+"OpenCV_Linux"+seperator+"build"+seperator+"lib"+seperator);
//File folder = new File("/Users/Tech/Documents/Development/workspace/opencv-3.0.0/bin/");
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile() && listOfFiles[i].getName().endsWith(".dylib")) {
File lib = new File(directory+seperator+"System"+seperator+"OpenCV_Linux"+seperator+"build"+seperator+"lib"+seperator + listOfFiles[i].getName());
//File lib = new File("/Users/Tech/Documents/Development/workspace/opencv-3.0.0/bin/" + listOfFiles[i].getName());
System.load(lib.getAbsoluteFile().toString());
}
}}
If you need more infos, send a message :)
Thank you very MUCH! Tech