Why do I receive an error message when building a shared library using the MATLAB Compiler with LCC?

4 views (last 30 days)
Why do I receive an error message when building a shared library using the MATLAB Compiler with LCC?
I am trying to build a shared library using the MATLAB Compiler with LCC . I also want to place all the generated files in directory that is different from my current directory using the following command:
mcc -v -m -W lib:libtestload testload.m -T link:lib -d dumydir
Running this command results in the following error:
ERROR: :
--> "lcclnk -o "dumpdir\libtestload.dll" -dll "dumpdir\_lib8651.def" -tmpdir "dumpdir\."
-L"D:\matlab6p5\sys\lcc\lib" -libpath "D:\matlab6p5\extern\lib\win32\lcc"
dumpdir\_lib8651_stub.obj @dumpdir\8651_tmp.rsp libmmfile.lib libmatlb.lib
libmx.lib libmat.lib libmwservices.lib libmex.lib libut.lib"
MBUILD.BAT: Error: Link of 'dumpdir\libtestload.dll' failed.
??? Error using ==> mbuild
Unable to complete successfully
??? Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable.
Error in ==> D:\matlab6p5\toolbox\compiler\mcc.dll

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Apr 2023
Edited: MathWorks Support Team on 24 Apr 2023
The error message is thrown by the LCC linker when the shared library is being built in a directory that is different from the current working directory. The shared library is built, but the LCC linker still throws the error, so you can safely ignore the error messages.
The other option is to use one of the other C/C++ compilers that are supported by the MATLAB Compiler. For a list of supported compilers, review the following URL:

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2009a

Community Treasure Hunt

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

Start Hunting!