I downloaded Dev-C++ 4.9.9.2 and created a console application in c:\temp\DevCPP. You can only compile C appications. If you want to use the C++ interface then you must use the Microsoft Visual C++ compiler. Here are the two files used to successfully compile an MPI application using Dev-C++:
Here is main.c:
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf("I am %d of %d\n", rank, size);
fflush(stdout);
MPI_Finalize();
return 0;
}
Here is mpi_sample.dev:
[Project]
FileName=mpi_sample.dev
Name=mpi_sample
UnitCount=1
Type=1
Ver=1
ObjFiles=
Includes="C:\Program Files\DeinoMPI\include"
Libs="C:\Program Files\DeinoMPI\lib"
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker="../../Program Files/DeinoMPI/lib/mpi.lib"_@@_
IsCpp=0
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=mpi_sample.exe
HostApplication=
Folders=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0000000000000000000000
[Unit1]
FileName=main.c
CompileCpp=0
Folder=
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0