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: How to create an executable using mcc for with multiple mex files?
Replies: 1   Last Post: Jun 17, 2013 4:42 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ramaprasad Kulkarni

Posts: 32
Registered: 8/17/10
How to create an executable using mcc for with multiple mex files?
Posted: Jun 16, 2013 8:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi All,

I want to generate a standalone executable for a mix of Matlab '.m' file and 'mex' files (with mexfunction in each of them). I used 'mcc' tool for this with the syntax:

>> mcc -o PMIA -W WinMain:PMIA -T link:exe -v PMIA.m anisodiff3d.c anisodiff3d8.c

The above command runs good until it throws a linker error:

anisodiff3d8.obj : error LNK2005: mexFunction already defined in anisodiff3d.obj
LINK : fatal error LNK1561: entry point must be defined

Essentially it says that mexFunction is redefined in the second C mex-file. It is necessary for each of the C file to be a mex-file so I can call them in Matlab and so should have a mexFunction in them, which in turn leads to the above linker error (to my understanding). Can anyone please suggest a solution or workaround for my issue?

--
Thanks in advance,
Ram.



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.