To export functions from the DLL when using Microsoft Visual Studio to compile your library, you must declare the functions as __declspec(dllexport). Therefore, to write a source code that works across platforms, use the following #define pattern:To compile the function into a library, place it in a file (here called ext.c as an example) and proceed as follows depending on the platform:
See http://www.comsol.com/system-requirements for information about supported compiler versions.
- Start Microsoft Visual Studio>Visual Studio Tools>Visual Studio x64 Win64 Command Prompt (2010) from the Windows Start menu.
- cd to the directory that contains ext.c.
-
-