This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling cdecl and c++decl for cygwin?


Warren, 

I commented out the lines you told me to

The result was:

[quote author="make"]
XETEX@ANDY /cygdrive/c/Users/XETEX/Desktop/temp/cdecl-2.5/cdecl-2.5
$ make
yacc cdgram.y && mv y.tab.c cdgram.c
conflicts: 7 shift/reduce
flex cdlex.l && mv lex.yy.c cdlex.c
gcc -s -O2 -DUSE_READLINE -o c++decl cdecl.c -lreadline -ltermcap
cdecl.c: In function `attempt_completion':
cdecl.c:402: warning: assignment makes pointer from integer without a cast
cdecl.c: In function `setprogname':
cdecl.c:808: error: argument "argv0" doesn't match prototype
/usr/include/cygwin/stdlib.h:22: error: prototype declaration
cdecl.c: In function `main':
cdecl.c:1255: warning: assignment from incompatible pointer type
make: *** [c++decl] Error 1
[/quote]

Warren Young wrote:
> 
> leeand00 wrote:
>> 
>> cdecl.c:141: error: conflicting types for 'setprogname'
>> /usr/include/cygwin/stdlib.h:22: error: previous declaration of
>> 'setprogname' was here
> 
> Remove line 141 from cdecl.c.  It's almost certainly a C prototype, 
> included for some blinkered system where that function isn't declared in 
> one of the system headers.  On Cygwin, it's obviously declared in
> stdlib.h.
> 
>> In file included from /usr/include/sys/unistd.h:159,
>>                  from /usr/include/unistd.h:4,
>>                  from lex.yy.c:588,
>>                  from cdecl.c:193:
>> /usr/include/getopt.h:52: error: conflicting types for 'getopt'
>> cdecl.c:127: error: previous declaration of 'getopt' was here
> 
> Same thing here: line 127 doesn't need to be there, for Cygwin at least.
> 
>> cdecl.c:402: warning: assignment makes pointer from integer without a
>> cast
> 
> You can ignore it, since it's just a warning.  If you want to fix it, 
> it's probably trivial.  I'm not all that interested in downloading the 
> source to debug it, though.
> 
>> cdecl.c:1255: warning: assignment from incompatible pointer type
> 
> Ditto.
> 
> --
> 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/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Compiling-cdecl-and-c%2B%2Bdecl-for-cygwin--tp18404720p18407146.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]