X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <17393e3e0802011353g788619a5t22555187f171f549@mail.gmail.com> Date: Fri, 1 Feb 2008 16:53:54 -0500 From: "Matt Wozniski" To: cygwin AT cygwin DOT com Subject: Re: Problem compiling MPI examples under cygwin In-Reply-To: <20080201214323.M38098@set-ezine.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080201214323 DOT M38098 AT set-ezine DOT org> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Feb 1, 2008 4:43 PM, madfran wrote: > Hi,... > > 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 AT 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 probably do: 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 sure) But anyway, this isn't really on-topic here, since this is just a general "How to compile in a POSIX environment" question. ~Matt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/