This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem compiling MPI examples under cygwin
- From: "Matt Wozniski" <godlygeek at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 1 Feb 2008 16:53:54 -0500
- Subject: Re: Problem compiling MPI examples under cygwin
- References: <20080201214323.M38098@set-ezine.org>
On Feb 1, 2008 4:43 PM, madfran wrote:
> I have a probleme when I try to compile under cygwin.
> The program it an example from MPICH2.
> Following the advice of the people from MPICH2, I install MPICH2 under
> WinXP, change the PATH to add the new addres and,... nothing, cygwin is
> not able to find the include.
Err... I wouldn't expect that to work on any POSIX platform. gcc
searches for includes in directories specified by -I on its command
line, not based on $PATH...
> madfran@8156 /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
> $ make hellow
> gcc -I../src/include -I../src/include -O2 -c hellow.c
> hellow.c:13:17: mpi.h: No such file or directory
> hellow.c: In function `main':
> hellow.c:21: error: `MPI_COMM_WORLD' undeclared (first use in this function)
> hellow.c:21: error: (Each undeclared identifier is reported only once
> hellow.c:21: error: for each function it appears in.)
> make: *** [hellow.o] Error 1
See, it's searching in "../src/include", in addition to the default
compiler directories. If the Makefile is 'standard', you could
make CFLAGS='-I /cygdrive/c/Program\ files/MPICH2/include' hellow
to convince it to search in the MPICH2 include dir as well.
(you may or may not need the \ before the space in program files,
depending on how make does its argument splitting, I'm not really
But anyway, this isn't really on-topic here, since this is just a
general "How to compile in a POSIX environment" question.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html