Compiling shared dinamyc library (.dll) with Visual C++ Microsoft Developer Studio (Version 6)
- Start it. Then, from the File menu, select New. Then, from the New dialog, select Project Workspace.
- In the Project Workspace dialog, specify a name for the project (such as “ar”).
- In addition, specify the path where you want to save the compiled codes.
- For Project Type choose “Win32 Dynamic-Link Library” (not MFCAppWizard (dll)).
- Then click on "an empty project".
- From the "Project menu", choose "Add to Project" and "Files".
- Add ar.c and ar.def to your project. To insert the .def file, use the "Files of Type" drop-down list and select Definition files (.def).
- Project -> Settings -> C/C++ tab. Add DLL_LOAD to the processor Definition text field.
- From the "Build menu", choose Rebuild All. Visual C++ will build your DLL, in either the Debug or Release subdirectory beneath your project workspace (depending upon whether you select “Debug” or “Release” in the Default Project Configuration dialog accessed from Build/Set Default Configuration...).
As mentioned before, I prefer option 3, which compiles the .dll directly with R.