[ADOL-C] Cygwin build of ADOL-C fails

Mihai Pomarlan mpomarlan at yahoo.co.uk
Thu Jun 9 18:42:25 EDT 2011


--- On Thu, 9/6/11, Kshitij Kulshreshtha <kshitij at math.upb.de> wrote:

> From: Kshitij Kulshreshtha <kshitij at math.upb.de>
> Subject: Re: [ADOL-C] Cygwin build of ADOL-C fails
> To: "Mihai Pomarlan" <mpomarlan at yahoo.co.uk>
> Date: Thursday, 9 June, 2011, 23:23
> Mihai Pomarlan <mpomarlan at yahoo.co.uk>
> wrote:
> 
> >I had to change the added lines slightly to get any
> output at all:
> >
> >_GNU_SOURCE undefined
> >_ISOC99_SOURCE undefined
> >__USE_ISOC99 undefined
> >
> >
> 
> I suppose you should add -D_GNU_SOURCE  to your CFLAGS
> then. That should help for almost all programs to be
> compiled with gcc.
> 
> 
> 
> --
> Dr. Kshitij Kulshreshtha
> 
> Sent from Mobile Phone.
> 

Hello again,

and yes, this time everything worked! To recap, here are the commands I ran:

autoreconf -fi
export CFLAGS='-std=c99 -D_GNU_SOURCE -D_ISOC99_SOURCE -D__USE_ISOC99'
export CXXFLAGS='-std=c++0x -D_GNU_SOURCE -D_ISOC99_SOURCE -D__USE_ISOC99'
export CPPFLAGS='-D_GNU_SOURCE -D_ISOC99_SOURCE -D__USEISOC99'
./configure
make V=1


And to make sure I added some more printf-s to the program. Here's the output from fminmax.exe:

_GNU_SOURCE 1
_ISOC99_SOURCE 1
__USE_ISOC99 1
MAX of 3.0 4.0 is 4.0
MIN of 3.0 4.0 is 3.0

Thanks again for the quick and helpful replies!

With regard,
Mihai Pomarlan




More information about the ADOL-C mailing list