我需要一个Windows C++项目的GMP。
我使用CygWin作为bash和编译器。GMP建议CygWin(和Mingw),所以技术上应该这样做。
我的错误发生在我“制作”项目之后,
autoconf
./configure --prefix "Some_Path_to_build"
make
错误是
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_fib_table -O2 -pedantic -fomit-frame-pointer -m64 -mtune=znver1 -march=znver1 -c fib_table.c -o fib_table.o
In file included from fib_table.c:4:
../gmp-impl.h:146:10: fatal error: ../gmp-mparam.h: Invalid argument
#include "gmp-mparam.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:492: fib_table.lo] Error 1
make[2]: Leaving directory '/cygdrive/d/SDK/gmp-6.2.1/mpn'
make[1]: *** [Makefile:997: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/SDK/gmp-6.2.1'
make: *** [Makefile:787: all] Error 2
我在VS Code中打开gmp-impl.h文件,它实际上说:找不到头,如果我悬停在#include <gmp-mparam.h>
部分.就像如果你inlcude一个头,这是不是在任何默认的包括目录。但是我(双重)检查了它,标题在正确的目录中。
我在Linux(Ubuntu)上用相同的命令编译了它多次,它工作得很好。
编辑
我今天才发现,这个头文件肯定有问题。我可以打开gmp-mparam.h
,但它是空的,当我试图编辑它或保存它,我抛出一个未知的错误。
1条答案
按热度按时间ffvjumwh1#
我在电脑上也遇到了这个错误。我认为是软符号链接导致了这个错误。然而,在将所有符号链接替换为真实文件后,我遇到了另一个问题。make命令卡在此命令上。