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: Borland C++ 4.0 Mex file compilation error - undefined symbol
Replies: 1   Last Post: Jul 1, 1996 5:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Leirich Oskar

Posts: 1
Registered: 12/7/04
Re: Borland C++ 4.0 Mex file compilation error - undefined symbol
Posted: Jul 1, 1996 5:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Tay Nguyen wrote:
>
> Hi,
>
> I'm trying to compile some existing C++ code into a mex function with Borland
> C++ 4.00 . I've correctly set up the cmex.bat file (I think) and when I try to
> compile the file I get the following error during the linking process :
>
> Error: Undefined symbol mxGetPr(matrix far*) in module matport.cpp


The reason for this error is the name mangling from C++. If you change the definition of the
function and declare them as "C" it should work:
extern "C" {
double * mxGetPr ( const Matrix *pm );
}





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.