Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matlab compiler issue

Status
Not open for further replies.

RandyC

Computer
Apr 11, 2003
5
Hi there,

I've been trying to get one of my Matlab apps to compile to a standalone C++ app using the compiler with little luck so far. Basically it’s stating that I have some undefined variables in the application. All of the variables that come up are in fact commands (like imshow). I'm typing in mcc -m (filename.m) on the command line and the same errors seem to occur. I think its not liking in to the Matlab libraries somehow. I have set up the compiler properly as per the instructions and am using the Borland C++ 5.5 compiler. Here is one of the errors that occurs on compile:

Warning: File: pwavemain_gui Line: 54 Column: 1
References to "whitebg" will produce a run-time error because it is an undefined
function or variable.

I'm running Windows XP Pro and using Matlab 6.5 and am using the Wavelet and Image Processing toolboxes. I am also using m files which have exported GUIDE created interfaces in them. The app works perfectly within Matlab with no runtime errors. Does anyone know a possible solution to this?

Thanks in advance.

Carl
 
Replies continue below

Recommended for you

Well, library pathing is always a problem when trying to compile a standalone program.
I think you may also have a problem with the Guide interfaces.

Why not break you program up into modules, and see which ones compile. That might help locate some of the compiler errors.
 
hi,

I`m using Matlab for the prediction of OIL DATA using artificial neural networks. I`m using 5 input,30 hidden layers and 5 output layers to get the results. But it`s taking nearly 20 hours for excution of the program. Moreover i`m not getting my Sum Squarred Error. How can i get my SSE with less time?

Thank you very much for all.

bye.
 
Since you're off-topic, why don't you start a new thread?

xnuke

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Hi,
The compiler does not recognize commands defined in the private directories, so copy the files on the private directories one directory up. Also, be sure you are invoking the graphics libraries, for instance, I compile a C shared library using graphics with this instruction
mcc -B sgl -t -W libhg:mycode_lib -L C -T link:lib -h mycode.m libmmfile.mlib libmwsglm.mlib. Check your manual for changes for C++.
Additionally, there is a bug in the compiler that does not allow you to handle figure menus, so disable it when you invoke the figure command.
Finally, the compiler does not recognize java based commands. There is no simple work around this problem due to the fact that a command is usually calling more functions.
Good luck!

 
Thanks for all the help. I'll have a look into it more but it looks like I will have to rewrite quite a few areas before the compiler will work correctly.

-RandyC-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor