Tag: cygwin

为什么mpirun不尊重我选择的BTL?

我在Windows 7机器上使用Cygwin上的Open MPI(1.8.3)。 我想在这台机器上独占运行MPI代码,而无需在任何外部网络上进行通信。 我知道我应该能够使用MCA选项将mpirun限制为自我和共享内存通信,如下所示: mpirun -n 8 –mca btl sm,self ./hello.exe 但是,当我尝试这个时,Windows会问我是否要设置防火墙例外,这表明我的工作是尝试通过TCP进行外部通信。 此外,mpirun将在完成前大约一分钟挂起,并且只有在hello world job完成之前我在无线网络上。 如果我关闭无线网卡或切换到有线以太网连接,它会在预期的大约一秒钟内完成。 为什么mpirun没有观察我选择的BTL?

在C中读取unicode文件时出错

我想使用以下代码在C(Cygwin / GCC)中读取unicode文件: #include #include #include void split_parse(char* text){ char** res = g_strsplit(text, “=”, 2); printf(“Key = %s : “, res[0]); printf(“Value = %s”, res[1]); printf(“\n”); } int main(int argc, char **argv) { setenv (“CYGWIN”, “nodosfilewarning”, 1); GIOChannel *channel; GError *err = NULL; int reading = 0; const gchar* enc; guchar magic[2] = { 0 […]

使用Cygwin编译Corkscrew时获取配置错误

我正在尝试使用Cygwin在Windows机器上编译开瓶器。 现在,每次我尝试配置它时,都会收到一条错误,指出configure: error: cannot guess build type; you must specify one configure: error: cannot guess build type; you must specify one 以下是那些想要查看它的人的完整错误日志: – Blueelvis_RoXXX@PranavVJituri ~/corkscrew-2.0 $ ./configure checking for a BSD-compatible install… /usr/bin/install -c checking whether build environment is sane… yes checking whether make sets $(MAKE)… yes checking for working aclocal-1.4… found checking for working […]

GCC / Cygwin下的InetNtop和ws2tcpip.h

我正在使用cygwin 2.774下的gcc 3.4.4提供的ws2tcpip.h版本 我正在查找InetNtop函数,这是Microsoft的inet_ntop实现,但我找到的两个版本的ws2tcpip.h不包含该函数。 包括arpa/inet.h来获取inet_ntop会导致各种可怕的重复定义。 有没有理由提供gcc / cygwin的版本没有这个function? 是否有(合法?)方式从Microsoft获得具有该定义的版本? 注意:我100%确定我有正确的#include #define , #include和链接器选项 注意:请不要建议使用较旧的WSA*function我很清楚它们。 编辑: 今天进行了一些挖掘并得出结论,标题必须缺少条目,因为这里是标题的grep: asdf@fdsa ~$ grep -i -B 4 -A 2 -R “inet_ntop” /usr/include/ /usr/include/arpa/inet.h-in_addr_t inet_netof (struct in_addr); /usr/include/arpa/inet.h-in_addr_t inet_network (const char *); /usr/include/arpa/inet.h-char *inet_ntoa (struct in_addr); /usr/include/arpa/inet.h-int inet_pton (int, const char *, void *); /usr/include/arpa/inet.h:const char *inet_ntop (int, const void *, […]

使用64位GCC在Cygwin上编译64位GSL

我试图在Windows 7机器上编译64位GSL。 以下是我采取的步骤: 下载并解压缩此处的GSL 1.15源代码。 通过编译最小程序测试我在Cygwin shell中有64位版本的GCC // simple.C int main() { ; return 0; } 运用 x86_64-w64-mingw32-gcc -m64 simple.C -o simple 在untarred文件夹中,我想将x86_64-w64-mingw32-gcc编译器传递给./configure但我不确定如何。 我查看了configure文件,但这很大,似乎是使用autoconf生成的。

Cygwin编译错误有问题的框架:#C 使用JNI

我使用JNI创建了一个简单的hello world应用程序一切正常,即使我的64位的dll被创建但是当我运行应用程序时它显示以下错误: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180116d47, pid=2140, tid=0x0000000000001710 # # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [cygwin1.dll+0xd6d47] # […]

多个目标模式?

我正在尝试编译ac文件,其中包含Mongo数据库的驱动程序。 我可以从Cygwin成功编译它,但是当我转向Netbeans时,我得到了这个。 我应该提一下,只有在C编译器的附加选项中添加“-std = c99”后才会发生这种情况。 更新: 从Netbeans成功编译。 但是“-std = c99”让我很生气。 如果我有它说(每次编译后,如果我不删除obj文件): build/Debug/Cygwin_4.x-Windows/main.od:1: *** multiple target patterns. Stop. 更新: main.od的内容是: build/Debug/Cygwin_4.x-Windows/main.o: main.c \ c:/mongodb-driver/src/mongo.hc:/mongodb-driver/src/bson.h \ c:/mongodb-driver/src/platform.h c:/mongodb-driver/src/mongo.h: c:/mongodb-driver/src/bson.h: c:/mongodb-driver/src/platform.h:

Makefile for Windows和Cygwin

我需要在Windows和Cygwin下使用makefile 。 我遇到makefile正确检测OS并设置适当变量的问题。 目标是为以下命令设置变量,然后使用变量调用规则中的命令: 删除文件:在Cygwin中的rm ,在Windows中的del 。 删除目录: rmdir (Cygwin和Windows中的不同参数) 复制文件:Cygwin中的cp ,在Windows中copy 。 测试文件存在:在Cygwin中test ,在Windows中test IF EXIST 。 列出文件的内容:在Cygwin中type cat ,在Windows中输入。 这是我的尝试,它始终使用else子句: OS_KIND = $(OSTYPE) #OSTYPE is an environment variable set by Cygwin. ifeq ($(OS_KIND), cygwin) ENV_OS = Cygwin RM = rm -f RMDIR = rmdir -r CP = cp REN = mv IF_EXIST = […]

shmget无法正常工作

#include #include #include #include #include #include #include int main() { int i=0; int shmid; int *mem=(int*)malloc(10*sizeof(int)); key_t key; key=1234; pid_t pid; shmid=shmget(1234,sizeof(*mem), IPC_CREAT|0666); if(shmid==-1) { printf(“shmget error\n”); return -1; } mem=shmat(shmid, NULL, 0); if(mem==(int*)-1) { printf(“shmat error\n”); return -1; } for(;i<10;i++) { *(mem+i)=0; } pid=fork(); if(pid<0) { fprintf(stderr,"Fork Failed"); printf("array : "); } else if […]

Cygwin gcc – asm错误:

我有一个用C编写的项目,最初是在Linux上完成的,但现在必须在Windows上完成。 部分代码在几个地方包含这一行 asm(“movl temp, %esp”); 但这会导致“未定义的引用’temp’”错误。 使用gcc 4.3.2编译器(在另一台机器上测试)在Linux上进行编译没有问题,这是我在Cygwin上的版本。 还有另一种方法可以完成这条线的工作吗?