Download MATLAB C Math Library 2.0 User's Guide
Transcript
1 Getting Ready Building a Stand-Alone Application on Microsoft Windows This section explains how to compile and link C code into stand-alone Windows applications. Configuring for C or C++ mbuild determines whether to compile in C or C++ by examining the type of files you are compiling. Table 1-1 shows the file extensions that mbuild interprets as indicating C or C++ files. If you include both C and C++ files, mbuild uses the C++ compiler and the MATLAB C++ Math Library. If mbuild cannot deduce from the file extensions whether to compile in C or C++, mbuild invokes the C compiler. Table 1-3: Windows File Extensions for mbuild Language Extension(s) C .c C++ .cpp .cxx .cc Note You can override the language choice that is determined from the extension by using the -lang option of mbuild. For more information about this option, as well as all of the other mbuild options, see Table 1-5. Locating Options Files To locate your options file, the mbuild script searches the following: • The current directory • The user Profiles directory • <matlab>\bin mbuild uses the first occurrence of the options file it finds. If no options file is found, mbuild searches your machine for a supported C compiler and uses the 1-22