我正在尝试编译一个名为 Phat 的工具(一个非常方便的注释工具) 但是当我键入 make
时出现此错误jason@jason:/home/jason/Documents/Phat$ make
gcc -Wall -c -o half_seq.o half_seq.c
In file included from half_seq.c:40:
half_seq.h:49:8: error: conflicting types for ‘round’; have ‘double(double, int)’
49 | double round(double x, int n);
| ^~~~~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from half_seq.c:26:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:301:1: note: previous declaration of ‘round’ with type ‘double(double)’
301 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
| ^~~~~~~~~~~
half_seq.c: In function ‘doBackTrack’:
half_seq.c:1013:9: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
1013 | short type;
| ^~~~
half_seq.c: At top level:
half_seq.c:1413:8: error: conflicting types for ‘round’; have ‘double(double, int)’
1413 | double round(double x, int n) {
| ^~~~~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from half_seq.c:26:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:301:1: note: previous declaration of ‘round’ with type ‘double(double)’
301 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
| ^~~~~~~~~~~
make: *** [<builtin>: half_seq.o] Error 1
这里是 Make 文件,如果有人可以帮助我如何编辑它,我正在使用 ubuntu 22.04
##
## You may need to edit the next few lines to set CC and CFLAGS appropriately
## for your system. You might also include a -O (optimize) option to CFLAGS to
## speed performance. Compilation with gcc and g++ has been cleanly
## implemented on the following platforms: Dec, Sun, Irix and Linux. If
## you get it going on another architechture we would appreciate a binary
## and details of any changes you had to make! <[email protected]>
##
## gcc
CC = gcc
#CFLAGS = -g -Wall -Wshadow -Wmissing-prototypes -Wtraditional
CFLAGS = -Wall
## g++
#CC = g++
#CFLAGS = -g -Wall -Wshadow -Wmissing-prototypes -Wtraditional
## Native compiler
#CC = CC
#CFLAGS = -g
##
## You probably don't need to edit below this line
##
CLIB = -lm
FULLOBJS = full_common.o full_phat.o full_probs.o full_seq.o full_splice.o full_output.o
HALFOBJS = half_common.o half_phat.o half_probs.o half_seq.o half_splice.o half_output.o
all: halfphat fullphat
halfphat: $(HALFOBJS)
$(CC) $(CFLAGS) -o halfphat $(HALFOBJS) $(CLIB)
fullphat: $(FULLOBJS)
$(CC) $(CFLAGS) -o fullphat $(FULLOBJS) $(CLIB)
## make distribution tarball
## (CVS stuff and vi's .swp backup files get filtered out)
tarball: clean
cd ..; find Phat -type f | grep -v "CVS" | grep -v "\.swp" > to_tar; tar -cf phat.tar -T to_tar; rm -f to_tar; gzip phat.tar
clean:
rm -f $(HALFOBJS) $(FULLOBJS)
rm -f halfphat fullphat
rm -f core
我尝试了其他编译器但没有成功。我没有太多的专业知识所以请帮助我