安装/ Cygwin中/ MinGW的编译 - 如何设置包括"路径"? (符号链接?) [英] Installing/compiling in Cygwin/MinGW - How to set the include "path"? (symbolic link?)
问题描述
我一直在试图安装/编译使用Cygwin和MinGW在Windows 7中的C库。不过,我在得到这样的错误制作
:
I have been trying to install/compile C libraries in Windows 7 using Cygwin and MinGW. However, I am getting errors like these during make
:
sys/resource.h: No such file or directory
sys/times.h: No such file or directory
我previously认为它可能是与特定库问题,在这里问:<一href=\"http://stackoverflow.com/questions/12737397/sys-time-h-not-found-error-when-installing-igraph-in-cygwin-and-mingw\">"sys/time.h"在Cygwin中和MinGW 安装的igraph的时候,却遇到不同的库相同的错误后,我认为问题出在我结束未发现的错误。
I previously thought it might be a problem with the specific libraries and asked here: "sys/time.h" not found error when installing igraph in Cygwin and MinGW, but after encountering the same error with different libraries, I think the problem lies on my end.
尝试
的cygwin的/ usr / include / sys中/ times.h
和的cygwin的/ usr / include / sys中/ RESOURCE.H
存在。收到有关符号链接意见后,我用 LN -s在/ usr / include / sys中SYS
确保 SYS / times.h
工作
cygwin/usr/include/sys/times.h
and cygwin/usr/include/sys/resource.h
exists. After getting advice regarding symbolic links, I used ln -s /usr/include/sys sys
to make sure that sys/times.h
worked.
我去看看制作
输出特定库(的igraph)。它说,它进入了一个SRC文件夹中。于是,我去了src文件夹,也做了同样的事情: LN -s在/ usr / include / sys中SYS
,并确信 SYS /次.H
src文件夹内过多的工作。
I went to look at the make
output for a specific library (igraph). It says it entered a "src" folder. So, I went to the src folder and did the same thing: ln -s /usr/include/sys sys
and made sure that sys/times.h
worked within the src folder too.
不过,我仍然得到:
fatal error: sys/times.h: No such file or directory
问
如何设置为路径让
找到SYS / times.h'或其他文件位于/ usr / include / sys中的文件夹?缺少什么我在这里?
How do I set the "path" for make
to find 'sys/times.h' or other files in the /usr/include/sys folder? What am I missing here?
P.S。
请多多包涵。
推荐答案
多的调查后,这个问题竟然是是:
After much investigation, the problem turned out to be that:
- MinGW的不具有SYS / times.h。
- Cygwin的有之,但我的Cyqwin用在我的Python海合会
目录,这是MinGW的的海湾合作委员会。
这在试图解决此问题的另一个发现:
This was discovered while trying to resolve another problem here:
<一个href=\"http://stackoverflow.com/questions/12749529/cannot-compile-c-$c$c-with-include-sys-times-h-in-cygwin\">Cannot编译C code用#include&LT; SYS / times.h&GT;在Cygwin中
所以,事实证明,我的问题无关,与包括路径或制作符号链接,而是在gcc版本/类型是错误的。这个事实躲避我,因为我运行一个全新安装的Cygwin,不知道它会自动使用MinGW的的海湾合作委员会在我的Python文件夹中。
So it turns out that my problem had nothing to do with the include path or making symbolic links, but rather, the gcc version/type was wrong. This fact eluded me because I was running a clean installation of Cygwin and didn't know that it would automatically use the MinGW's gcc in my Python folder.
这篇关于安装/ Cygwin中/ MinGW的编译 - 如何设置包括&QUOT;路径&QUOT;? (符号链接?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!