MATLAB: Is the last example in the documentation for the MBUILD function referring to the wrong external C program in MATLAB Compiler 4.5 (R2006b)

cexternalliblibrarylinkMATLAB Compilermbuildprogram

In the MATLAB Compiler documentation for the MBUILD function (see the URL below) you will find this example:
To compile and link an external C program callfoo.c against libfoo,use
mbuild foo.c -L. -lfoo (on UNIX)
mbuild foo.c libfoo.lib (on Windows)
This assumes both foo.c and the library generated above are in the current working directory.

Best Answer

This bug has been fixed in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
This is an error within the documentation for MATLAB Compiler 4.5 (R2006b) within the MBUILD section. The external C program callfoo.c should be changed to foo.c.
The documentation should read as follows:
To compile and link an external C program foo.c against libfoo,use
mbuild foo.c -L. -lfoo (on UNIX)
mbuild foo.c libfoo.lib (on Windows)
This assumes both foo.c and the library generated above are in the current working directory.