×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Matlab compiler issue

Matlab compiler issue

Matlab compiler issue

(OP)
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

RE: Matlab compiler issue

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.

RE: Matlab compiler issue

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.  

RE: Matlab compiler issue

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.

RE: Matlab compiler issue

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!  

RE: Matlab compiler issue

(OP)
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-

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources