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: build a static library instead of a dynamic one with MEX compiler
Replies: 1   Last Post: Jan 8, 2013 12:54 AM

Advanced Search

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

Posts: 21
Registered: 2/8/12
build a static library instead of a dynamic one with MEX compiler
Posted: Feb 22, 2012 6:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello

I m looking for an option of the mex compiler in order to produce a static mex file with all the code, that it needs, already inside it.
which can substitute all the external references inside my c code with the real code from the external library.

i tried to do that because I created a mex file to put inside a 2ndlevel sfunction block
mex file.c -l APP_Numerical
and until now everything is fine the program works on Simulink
(the option -l is there, because I made some references to an external library)


Then in order to use it in a real time simulator, I need to translate this model with Real-Time Workshop (now Simulink Coder), but when I attempt to do that I get an error from the linker, which cannot find an external reference; i tried to add this library to the matlab path, but it doesn't work, then I fix it adding the static path of this library (.lib) in the option of Real-Time Workshop.

Is that any way to avoid that?
I don't work with the same computer all the time, sometimes I need to switch it with other guys. So everytimes that I need to rebuild the library I need to looking for this library inside the new computer and put its path in the option of Real-Time Workshop.

So I was wondering if there is a way to ask to the mex compiler to substitute all the external references with the real code from the external library.
In this way instead to produce a dynamic library it will produce a static library with all the code that it needs already inside it.



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.