README FILE FOR USING SYMANTEC C/C++ COMPILER VERSION 6.0 OR 7.0 TO BUILD A USER DLL FOR MATHCAD PROFESSIONAL The instructions below apply to the Integrated Development and Debugging Environment, IDDE. The instructions assume that you have installed Mathcad in the directory C:\WINMCAD. If this is not true (for example, if you installed to the directory C:\PROGRAM FILES\MATHSOFT\MATHCAD), then please substitute the correct path wherever C:\WINMCAD appears. Sample files are available in the SOURCES subdirectory. Symantec IDDE projects generally have many files associated with them. The samples each have 6 project files in addition to the .c source files. To build a sample project just start the IDDE, open the project and Rebuild it. To build a new project in the IDDE: * Start a new project. * Choose a path and name for the project file. * Add your source files to the project. (If you have not created them yet you can add them later.) * Add the library file MCADUSER.LIB in the SYMANTEC\LIB directory to the project. * In the Options Project dialog box choose Win32s DLL. * In the Options Directories dialog box add the directory where the include file MCADINCL.H for SYMANTEC is located, e.g. C:\WINMCAD\USEREFI\SYMANTEC\INCLUDE (or ..\..\INCLUDE in relative notation for the samples) to the Include path. Now you are ready to build the DLL. You can do this by choosing Build All on the Project menu. After building you have to move the DLL to the USEREFI directory under Mathcad's home directory, e.g. C:\WINMCAD\USEREFI. Comments: * In version 7.0 you must call the DLL entry point DllMain. Substitute "DllMain" in any place that "DllEntryPoint" occurs in any of the sample *.c files and rebuild a project for the new *.c source files. * In version 6.0 the DLL entry point can be called anything you want, e.g., DllEntryPoint, as in the sample files. However, you need a pragma directive to declare the name to the linker. So if the entry point is called DllEntryPoint, insert the following line right after the function definition: #pragma startaddress(DllEntryPoint) * The default structure alignment for Win32s applications in Symantec is 8-byte alignment. For more information see the sample source files and the README.TXT file in the USEREFI subdirectory.