首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >MinGW中的图形编译错误

MinGW中的图形编译错误
EN

Stack Overflow用户
提问于 2014-09-09 08:34:15
回答 1查看 524关注 0票数 0

我正试图在Windows下使用艾格图编译MinGW 0.7.1。这有三个步骤。

代码语言:javascript
运行
复制
configure
make
make install

配置运行良好。但是我从make中得到了以下错误。

代码语言:javascript
运行
复制
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。

在我听从塔马斯的建议后,我犯了错误。

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

发布于 2014-09-09 10:41:24

sys/times.h标头在Windows上不可用。这个标头似乎是从src/f2c/dtime_.csrc/f2c/etime_.c引用的,但前提是没有定义USE_CLOCK。试着按以下方式重新编译igraph:

代码语言:javascript
运行
复制
CFLAGS=-DUSE_CLOCK ./configure
make
make install

Update:您还需要进行其他一些修改,因为MinGW似乎不支持Update的一个组件f2c使用的其他一些东西。有关要调整的更多内容,请参见堆栈溢出上的这一反应

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25740015

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档