我正试图在Windows下使用艾格图编译MinGW 0.7.1。这有三个步骤。
configure
make
make install
配置运行良好。但是我从make中得到了以下错误。
make all-recursive
make[1]: Entering directory `/home/874469/igraph-0.7.1'
Making all in src
make[2]: Entering directory `/home/874469/igraph-0.7.1/src'
make all-am
make[3]: Entering directory `/home/874469/igraph-0.7.1/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DSkip_f2c_Undefs -I. -I../include -I../include -Wall -g -O2 -MT f2
c/libf2c_la-dtime_.lo -MD -MP -MF f2c/.deps/libf2c_la-dtime_.Tpo -c -o f2c/libf2c_la-dtime_.lo `test -f 'f2c/dtime_.c' || echo './'`f2c/dtime_.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DSkip_f2c_Undefs -I. -I../include -I../include -Wall -g -O2 -MT f2c/libf2c_la-dtime_.lo -MD -MP
-MF f2c/.deps/libf2c_la-dtime_.Tpo -c f2c/dtime_.c -DDLL_EXPORT -DPIC -o f2c/.libs/libf2c_la-dtime_.o
f2c/dtime_.c:16:23: fatal error: sys/times.h: No such file or directory
#include "sys/times.h"
^
compilation terminated.
make[3]: *** [f2c/libf2c_la-dtime_.lo] Error 1
make[3]: Leaving directory `/home/874469/igraph-0.7.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/874469/igraph-0.7.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/874469/igraph-0.7.1'
make: *** [all] Error 2
这里出什么问题了?我使用gcc和g++版本4.8.1。
在我听从塔马斯的建议后,我犯了错误。
f2c/uninit.c: In function 'ieee0':
f2c/uninit.c:182:2: warning: implicit declaration of function '_control87' [-Wimplicit-function-declaration]
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
f2c/uninit.c:171:21: error: '_EM_DENORMAL' undeclared (first use in this function)
#define EM_DENORMAL _EM_DENORMAL
^
f2c/uninit.c:182:13: note: in expansion of macro 'EM_DENORMAL'
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
f2c/uninit.c:171:21: note: each undeclared identifier is reported only once for each function it appears in
#define EM_DENORMAL _EM_DENORMAL
^
f2c/uninit.c:182:13: note: in expansion of macro 'EM_DENORMAL'
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
f2c/uninit.c:174:22: error: '_EM_UNDERFLOW' undeclared (first use in this function)
#define EM_UNDERFLOW _EM_UNDERFLOW
^
f2c/uninit.c:182:27: note: in expansion of macro 'EM_UNDERFLOW'
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
f2c/uninit.c:177:20: error: '_EM_INEXACT' undeclared (first use in this function)
#define EM_INEXACT _EM_INEXACT
^
f2c/uninit.c:182:42: note: in expansion of macro 'EM_INEXACT'
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
f2c/uninit.c:180:16: error: '_MCW_EM' undeclared (first use in this function)
#define MCW_EM _MCW_EM
^
f2c/uninit.c:182:54: note: in expansion of macro 'MCW_EM'
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
^
make[3]: *** [f2c/libf2c_la-uninit.lo] Error 1
make[3]: Leaving directory `/home/874469/igraph-0.7.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/874469/igraph-0.7.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/874469/igraph-0.7.1'
make: *** [all] Error 2
发布于 2014-09-09 10:41:24
sys/times.h
标头在Windows上不可用。这个标头似乎是从src/f2c/dtime_.c
和src/f2c/etime_.c
引用的,但前提是没有定义USE_CLOCK
。试着按以下方式重新编译igraph:
CFLAGS=-DUSE_CLOCK ./configure
make
make install
Update:您还需要进行其他一些修改,因为MinGW似乎不支持Update的一个组件f2c
使用的其他一些东西。有关要调整的更多内容,请参见堆栈溢出上的这一反应。
https://stackoverflow.com/questions/25740015
复制相似问题