relative and absolute path problems

  • Follow


hi,

I simply have no idea how to tackle this (whether it is possible), so any help will be greatly appreciated.
I have got an exe file compiled from a number of m files and mex file using matlab mcc command. When running the exe file it calls mex a couple of times. Mex in turn calls some external, separate files containing required parameters. It all works fine on my machine.
Problems starts when you run the exe kernel in the on a different machine, under a C interface which I believe creates a temp directory for the kernel (someone else designed the interface). The mex file cannot locate the folder with external files anymore and kernel crashes after running from the user interface.
I though I should change the path in mex gateway function (f90) to something else but (perhaps an absolute rather than relative path??) but these are just guesses. I suppose ideally I should make the folder with externel files part of the exe, but then how to point the directory to 'itself'...

cheers
Mat
0
Reply Mateusz 11/16/2010 6:44:04 PM

Mat:
What do you mean by "under a C interface"?

What operating system are you using?

Are you using a startup.m file?  This gets run when you compile an m-
file and run it.

Try printing out mfilename, pwd, and ctfroot in your opening function
to see what they say.

Have you looked at sections 3.10 and 3.11 of the FAQ?
http://matlab.wikia.com/wiki/FAQ

0
Reply ImageAnalyst 11/17/2010 12:32:44 AM


1 Replies
349 Views

(page loaded in 0.023 seconds)

Similiar Articles:













7/26/2012 5:33:08 PM


Reply: