Why do I receive an error message when building a MEX-file with the LCC compiler in MATLAB?

1 view (last 30 days)
Why do I receive the error message "Can't find the path of the lcc libraries.(libc.lib missing)" when build a MEX-file with the LCC compiler in MATLAB?
I am attempting to compile and link a MEX-file using the MEX command from the DOS prompt. One thing I am doing is trying to append some linker options to the MEX build by using the LINKFLAGS#"$LINKFLAGS option. However, I seem to be consistently getting the following error message:
Can't find the path of the lcc libraries.(libc.lib missing)
Please enter it now: (for example c:\lcc\lib)
Directory does not exist. I quit
C:\ENGAPPS\MATHWORKS\MATLAB6P5\BIN\WIN32\MEX.PL: Error: Link of 'sfun_atmos1.dll' failed.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This problem typically occurs if you are defining the /LIBPATH flag with a colon, which is not valid. Instead, you should leave a space between the /LIBPATH flag and the option it defines as the following command illustrates:
mex -v LINKFLAGS#"$LINKFLAGS dformd.lib dfconsol.lib dfport.lib
/LIBPATH $DF_ROOT\ DF98\LIB" sfun_atmos1.c sfun_atmos_sub.obj

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!