Re: [OMPI users] Problem including C MPI code from C++ using C linkage

2010-09-03 Thread Patrik Jonsson
Hi everyone, Thanks for the suggestions. On Thu, Sep 2, 2010 at 6:41 AM, Jeff Squyres wrote: > On Aug 31, 2010, at 5:39 PM, Patrik Jonsson wrote: > >> It seems a bit presumptuous of mpi.h to just include mpicxx.h just >> because __cplusplus is defined, since that makes it impossible to link >> C

Re: [OMPI users] Problem including C MPI code from C++ using C linkage

2010-09-02 Thread Jeff Squyres
On Aug 31, 2010, at 5:39 PM, Patrik Jonsson wrote: > It seems a bit presumptuous of mpi.h to just include mpicxx.h just > because __cplusplus is defined, since that makes it impossible to link > C MPI code from C++. The MPI standard requires that work in both C and C++ applications. It also re

Re: [OMPI users] Problem including C MPI code from C++ using C linkage

2010-09-01 Thread Lisandro Dalcin
On 31 August 2010 18:39, Patrik Jonsson wrote: > Hi all, > > I'm have a C MPI code that I need to link into my C++ code. As usual, > from my C++ code, I do > > extern "C" { > #include "c-code.h" > } > #include extern "C" { #include "c-code.h" } Would that be enough? > where c-code.h includes,