Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: engOpen() always returns 0
Replies: 6   Last Post: Nov 29, 2012 8:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Thomas Van Parys

Posts: 3
Registered: 11/7/08
engOpen() always returns 0
Posted: Nov 7, 2008 5:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

My aim is to call Matlab from a java plugin I'm writing.
I was already able to do this some time ago, but since a recent re-install, the very same application just stopped working.

The java application always returns 'Can't open engine' as the native function engOpen(char*) returns 0.

I now tried several approaches:
- calling engOpen("\0") from a simple enginedemo.c program
- calling engOpen(null) from java, using JNA mapped to libeng.so
- calling engine.engOpen() from java, using JMatLink (which uses JNI).

Every time getting an engine pointer = 0
I didn't get any errors compiling enginetest.c or compiling libJMatLink.so.

compiling C example:
gcc $(MIN) $(MLIB) -leng -lmx enginetest.c -o enginetest.out

LD_LIBRARY_PATH points to $(MATLAB)/bin/glnx86
So I'm not getting any linking errors, not when compiling, not when running... but engOpen() just fails to open a matlab engine. It simply returns 0, apparently without any further errors.

What could I be missing here?
Matlab itself works fine when I enter 'matlab' on the command line.

My system:
Fedora 9
gcc 4.3.0
Sun Java 1.6.0_10
Matlab 7.6.0 (R2008a)

Thanks for every hint about what could be going wrong here... I've already lost several days on this problem.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.