This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Compiling cdecl and c++decl for cygwin?
- From: leeand00 <leeand00 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 11 Jul 2008 07:08:55 -0700 (PDT)
- Subject: Compiling cdecl and c++decl for cygwin?
Hello I just downloaded the source to cdecl-2.5 from
ftp://sunsite.unc.edu/pub/Linux/devel/lang/c//cdecl-2.5.tar.gz
cdecl/c++decl is a very old program for converting compilable C declarations
and typecasts from descriptive English phrases and back again.
my development directory looks like the following:
[quote author="directory"]
XETEX@ANDY /cygdrive/c/Users/XETEX/Desktop/temp/cdecl-2.5/cdecl-2.5
$ ls
Makefile c++decl.1 cdecl.c cdgram.y readline testset
README cdecl.1 cdgram.c cdlex.l termcap testset++
[/quote]
Note that I had to go retrieve the readline 5.2 src and termcap 1.3.1 src as
they were not included in the download.
I attempted to compile cdecl using make and gcc (as installed per packages
available from cygwin) and I received the following error:
[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
lex cdlex.l && mv lex.yy.c cdlex.c
/bin/sh: lex: command not found
make: *** [cdlex.c] Error 127
[/quote]
I opened Makefile and discovered that lex is not included in Cygwin; however
flex is included in Cygwin. So I changed the references to lex within
Makefile to flex, and tried to compile again using the make command.
This time I received the following error:
[quote author="make"]
flex cdlex.l && mv lex.yy.c cdlex.c
gcc -s -O2 -DUSE_READLINE -o c++decl cdecl.c -lreadline -ltermcap
cdecl.c:141: error: conflicting types for 'setprogname'
/usr/include/cygwin/stdlib.h:22: error: previous declaration of
'setprogname' was here
cdecl.c:141: error: conflicting types for 'setprogname'
/usr/include/cygwin/stdlib.h:22: error: previous declaration of
'setprogname' was here
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
/usr/include/getopt.h:52: error: conflicting types for 'getopt'
cdecl.c:127: error: previous declaration of 'getopt' was here
cdecl.c: In function `attempt_completion':
cdecl.c:402: warning: assignment makes pointer from integer without a cast
cdecl.c: In function `main':
cdecl.c:1255: warning: assignment from incompatible pointer type
make: *** [c++decl] Error 1
[/quote]
How can I get cdecl/c++decl to compile on window or cygwin? Is there a
precompiled binary port for windows? Has cdecl been replaced by some other
newer tool?
Thank you,
Andrew J. Leer
--
View this message in context: http://www.nabble.com/Compiling-cdecl-and-c%2B%2Bdecl-for-cygwin--tp18404720p18404720.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/