Why my mcc compiler does not generate a line for external call to mlfXxx ?

I created a c-shared library for the function
function y = foo(x)
y = x+1;
using "mcc -B csharedlib:foolib foo.m".
The fisrt time I compiled a header file (foolib.h) was created, which included lines
bool MW_CALL_CONV mlxFoo(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);
and
extern LIB_foolib_C_API bool MW_CALL_CONV mlfFoo(int nargout, mxArray** y, mxArray* x);
File foolib.dll was generated, 99Kb.
I recompiled 2 hours later with no errors (using the -v option to confirm that). Now the above two lines are MISSING in the foolib.h file.
Why?
The second file foolib.dll that was generated in much bigger, 563Kb.
The problem is that the second version cannot be used in Microsoft Visual Studio 2010 Express Edition, and the first one can be. If I add manually the "extern" lines the problem is not solved. I followed this excellent link from MathWoks: https://www.mathworks.com/support/solutions/en/data/1-F9VB0V/index.html?product=CO&solution=1-F9VB0V to created the shared library.
Details: Compiler version: 4.14 (R2010b)

Answers (0)

This question is closed.

Products

Asked:

on 31 Jul 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!