You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by john ware <jw...@voicelog.net> on 2006/05/13 00:18:25 UTC

ant can't find windows.h

Hi,
	I got sources using:

svn co http://svn.apache.org/repos/asf/logging/log4cxx/trunk logging-log4cxx

I'm using cygwin bash on a windoz server 2003,sp1.  I call ant in logging-log4cxx and I get the errors below. It can't find the standard ms compiler
 headers. 


Two questions: does the cc task generate an output file of the compilation process and how does one pass an include flag to the c++ compiler. 

thanks,

john ware



cd d:/cygwin/home/jware/dev/logging-log4cxx/
ant
Buildfile: build.xml

os-detect:

win-init:

mac-init:

unix-init:

init:

build-apr:

get-apr-src:

untar-apr-src:

os-detect:

win-init:

unix-init:

init:
    [mkdir] Created dir: D:\cygwin\home\jware\dev\logging-log4cxx\build\debug\static

configure-check:

unix-configure:

win-configure:
     [copy] Copying 1 file to D:\cygwin\home\jware\dev\logging-log4cxx\lib\apr-1.2.7\include

configure:

build:
    [mkdir] Created dir: D:\cygwin\home\jware\dev\logging-log4cxx\build\debug\static\apr_obj
       [cc] 66 total files to be compiled.
       [cc] misc.c
       [cc] D:\cygwin\home\jware\dev\logging-log4cxx\lib\apr-1.2.7\include\apr.h(90) : fatal error C1083: Cannot open include file: 'windows.h': Invalid argument
       [cc] filepath.c
       [cc] D:\cygwin\home\jware\dev\logging-log4cxx\lib\apr-1.2.7\include\apr.h(90) : fatal error C1083: Cannot open include file: 'windows.h': Invalid argument


Re: ant can't find windows.h

Posted by Andreas Fester <af...@apache.org>.
john ware wrote:
> I'm required to use the compiler from visualstudio and I use cygwin for
> launching ant only. I have modified build.xml to call cl.exe to build

Is there any specific reason why you are launching ant from cygwin?
ant can also perfectly be launched from a normal DOS shell with the
ant.bat file.

> and link. What I can't figure out is how to modify build.xml so that I
> can control what gets passed to the compiler and to see the ouput from
> the compiler when I give it the wrong thing; you know a log file.

You can increase ant verbosity by passing the "-v" option to ant.
The cpptasks then also print the complete command line which is
used to launch external programs like the compiler and the linker,
including the passed options.

Regards,

	Andreas



Re: ant can't find windows.h

Posted by john ware <jw...@voicelog.net>.
I'm required to use the compiler from visualstudio and I use cygwin for 
launching ant only. I have modified build.xml to call cl.exe to build 
and link. What I can't figure out is how to modify build.xml so that I 
can control what gets passed to the compiler and to see the ouput from 
the compiler when I give it the wrong thing; you know a log file.

I hope that is more clear.

thanks for the response.

john

Curt Arnold wrote:

>
> On May 12, 2006, at 5:18 PM, john ware wrote:
>
>> Hi,
>>     I got sources using:
>>
>> svn co http://svn.apache.org/repos/asf/logging/log4cxx/trunk  
>> logging-log4cxx
>>
>> I'm using cygwin bash on a windoz server 2003,sp1.  I call ant in  
>> logging-log4cxx and I get the errors below. It can't find the  
>> standard ms compiler
>> headers.
>>
>> Two questions: does the cc task generate an output file of the  
>> compilation process and how does one pass an include flag to the c+ + 
>> compiler.
>> thanks,
>>
>> john ware
>>
>
> Running under the cygwin shell doesn't really affect the build  
> process other than putting the Cygwin gcc on the path.  As it stands,  
> the build process assumes that you want to build a Win32 DLL using a  
> MinGW gcc (which would have a windows.h in its default include  
> directory).  If you want to build a more Unixy log4cxx running under  
> a Cygwin compatibility layer, you have to override the assumed Win32  
> target platform, by specifying:
>
> ant -Dos.family=cygwin
>
> However, I haven't tested the cygwin or MinGW builds for a long time  
> and can't say that will get you much further.  The autoconf style  
> builds might be a more natural way to create a Cygwin log4cxx, since  
> they always assume that you are targeting a Unix-like platform.
>
>

Re: ant can't find windows.h

Posted by Curt Arnold <ca...@apache.org>.
On May 12, 2006, at 5:18 PM, john ware wrote:

> Hi,
> 	I got sources using:
>
> svn co http://svn.apache.org/repos/asf/logging/log4cxx/trunk  
> logging-log4cxx
>
> I'm using cygwin bash on a windoz server 2003,sp1.  I call ant in  
> logging-log4cxx and I get the errors below. It can't find the  
> standard ms compiler
> headers.
>
> Two questions: does the cc task generate an output file of the  
> compilation process and how does one pass an include flag to the c+ 
> + compiler.
> thanks,
>
> john ware
>

Running under the cygwin shell doesn't really affect the build  
process other than putting the Cygwin gcc on the path.  As it stands,  
the build process assumes that you want to build a Win32 DLL using a  
MinGW gcc (which would have a windows.h in its default include  
directory).  If you want to build a more Unixy log4cxx running under  
a Cygwin compatibility layer, you have to override the assumed Win32  
target platform, by specifying:

ant -Dos.family=cygwin

However, I haven't tested the cygwin or MinGW builds for a long time  
and can't say that will get you much further.  The autoconf style  
builds might be a more natural way to create a Cygwin log4cxx, since  
they always assume that you are targeting a Unix-like platform.