Project / Makefile Settings: Symbol Definitions
MPI_DECL1/MPI_DECL2 | MPI_ASSERT | MPI_PLATFORM
This section describes compile-time symbol definitions used by the MPI library.
MPI_DECL1 / MPI_DECL2
These symbols are used in library header files to handle compiler-specific language extensions when declaring external functions and data; in particular, those extensions used when making Win32 dynamic link libraries (DLLs). MPI_DECL1 precedes the return type of a function declaration; MPI_DECL2 follows the return type and precedes the function name:
MPI_DECL1 long MPI_DECL2 mpiModuleFunction();
Use the following symbol definitions when building an application or the MPI library.
Platform |
MPI_DECL1 |
MPI_DECL2 |
| Windows | __declspec(dllimport) | __stdcall |
| VxWorks | extern | <empty>† |
| Linux | extern | <empty>† |
† <empty> indicates that MPI_DECL1 or MPI_DECL2 should be defined, but not be defined as a macro. This is equivalent to placing one of the following lines in your code: |
||
MPI_ASSERT
When defined, MPI_ASSERT will cause calls to the macro mpiASSERT(expression) to be compiled into the library. Otherwise, these calls will be discarded by the preprocessor.
The mpiAssert(...) macro is used by the library and is available to applications. It is a valuable debugging tool that can be used to catch programming errors at their source and prevent them from spreading. If the argument to the macro is TRUE (i.e. non-zero), execution proceeds normally. Otherwise, an error message is displayed; the message contains the name of the file and the line number of the mpiAssert(...) call. The application exits after displaying the message.
The MPI_ASSERT define is also required for the msgCHECK(...) macro to work. msgCHECK(...) is use throughout the sample applications and utilities.
MPI_PLATFORM
The MPI_PLATFORM symbols are used to indicate the platform for which the library and applications are built. Each platform has its own unique symbol.
Standard platform define:
| MPI_PLATFORM_WINNT | Microsoft Windows NT/2000/XP |
Supported platforms, requires platform specific release (contact Danaher Motion for availability):
| MPI_PLATFORM_WINRTSS | Ardence WinNT RealTime SubSystem |
| MPI_PLATFORM_VXWORKS | WindRiver Systems VxWorks |
| MPI_PLATFORM_LINUX | Linux |
| MPI_PLATFORM_SOLARIS | Sun Solaris Operating System |
| MPI_PLATFORM_UITRON | The Real-time Operating system Nucleus |
Reserved for future use:
| MPI_PLATFORM_WINCE | Windows CE |
Legacy platforms (no longer supported):
| MPI_PLATFORM_WIN95 | Microsoft Windows 95 |
| MPI_PLATFORM_LYNXOS | Real-Time Systems LynxOS |
| MPI_PLATFORM_QNX | Quantum Software Systems |
NOTE: Existence of an MPI_PLATFORM symbol for a potentially supported platform does not imply intent to support that platform.
