2011-01-29 66 views
0

我完全新手與cygwin和我想編譯東京內閣 我得到以下錯誤,並不能找出爲什麼我有這個衝突 有人可以幫我嗎?東京內閣不編譯cygwin

感謝

$ make 
gcc -c -I. -I/usr/local/include -I/home/Larry/include -I/usr/local/include -DND 
EBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__ -D_TC_PREFIX="\"/usr/local\"" 
-D_TC_INCLUDEDIR="\"/usr/local/include\"" -D_TC_LIBDIR="\"/usr/local/lib\"" -D_ 
TC_BINDIR="\"/usr/local/bin\"" -D_TC_LIBEXECDIR="\"/usr/local/libexec\"" -D_TC_A 
PPINC="\"-I/usr/local/include\"" -D_TC_APPLIBS="\"-L/usr/local/lib -ltokyocabine 
t -lbz2 -lz -lrt -lpthread -lm -lc \"" -g -O2 -std=c99 -Wall -fPIC -fsigned-char 
-O2 tcutest.c 
tcutest.c:1: warning: -fPIC ignored for target (all code is position independent 
) 
tcutest.c:31: error: conflicting types for 'iprintf' 
/usr/include/stdio.h:259: error: previous declaration of 'iprintf' was here 
make: *** [tcutest.o] Error 1 

回答

3

惱人的種類。全局重命名iprintfmy_iprintf或類似的東西。我沒有Cygwin的,但只是試圖在Linux上,這行之有效:

$ sed -i.bak 's/iprintf/my_iprintf/g' *.c *.h bros/*.c 
$ ./configure 
... blah blah configuring blah blah ... 
#================================================================ 
# Ready to make. 
#================================================================ 
$ make 
... blah blah building blah blah ... 
#================================================================ 
# Ready to install. 
#================================================================ 
$ ./tctmgr --version 
Tokyo Cabinet version 1.4.46 (909:1.0) for Linux 
Copyright (C) 2006-2010 FAL Labs 

IIRC的cygwin有GNU的coreutils,其中包括sed,但它已經有一段時間,因爲我用它。提示:請保留tarball,以便在出現錯誤時重新解壓,但sed命令也會保留備份。

+0

感謝它的工作! – Larry 2011-01-29 12:43:35