Topic
1 reply Latest Post - ‏2013-07-19T16:30:55Z by rdumeur
0BKU_derrien_alban
0BKU_derrien_alban
1 Post
ACCEPTED ANSWER

Pinned topic running SchedRCPSP example on Mac ?

‏2013-07-19T14:33:02Z |

Hi,

 

I just installed the CPLEX_stupio1251 in order to use cpoptimizer.

I am currently trying to get running the code given as example for a RCPSP problem.

Using java, I built a new project with the file given :  CPLEX_Studio1251/cpoptimizer/examples/src/java/SchedRCPSP

then added the jar: CPLEX_Studio1251/cpoptimizer/lib/ILOG.CP.jar

But I do get the error: "

Native code library failed to load: ensure the appropriate library (opl1251.dll/.so) is in your path.

Exceptions:

no opl1251 in java.library.path

no opl_lang_wrap_cpp in java.library.path

...

"

From my search I need to add a native library from opl .....

but the thing is that I am a mac user, and opl is not compatible http://pic.dhe.ibm.com/infocenter/prodguid/v1r0/clarity-reports/report/html/softwareReqsForProduct?deliverableId=1357752720677&osPlatform=Mac%20OS

 

What I am missing ?

 

Regards,

Alban.

  • rdumeur
    rdumeur
    82 Posts
    ACCEPTED ANSWER

    Re: running SchedRCPSP example on Mac ?

    ‏2013-07-19T16:30:55Z  in response to 0BKU_derrien_alban

    Dear Alban,

    What version of MacOS X are you using?

    Also, please run  the CP optimizer java examples installed in <installdir>/cpoptimizer/examples/src/java. They should function correctly when you execute them using the makefile in <installdir>/cpoptimizer/examples/<platform>/<arch>.

    Looking at env variables used in the makefile, we can see directives as:CPCLASSPATH = ../../../lib/ILOG.CP.jar
    LIBRARYPATH = ../../../bin/x86-64_osx:$(CPLEXDIR)/bin/x86-64_osx
    JAVAEXDIR = ../../../examples/src/java
        @echo "Currently, JAVA_HOME = $(JAVA_HOME)"
        DYLD_LIBRARY_PATH=$(LIBRARYPATH):$$DYLD_LIBRARY_PATH $(JAVA) $(JAVAFLAGS) -classpath $(CPCLASSPATH):. Color

    So please make sure that the correct DYLD_LIBRARY_PATH is set when invoking your example.

    I hope this helps,

    Cheers,