繁体   English   中英

使用MinGW为Windows构建一个linux库

[英]Build a linux library for windows with MinGW

有一个带有make脚本的linux的lib源代码。 http://svn.gna.org/svn/pokersource/branches/poker-eval-java/ 我需要为windows构建它。 应该是两个dll。 主dll和第二个dll是jni-wrapper,用于从java调用本机函数。 我使用这样的命令在linux下构建它:

autoreconf --install
./configure --enable-java
make

它成功构建并且工作正常。 但现在我需要为windows制作它。 我已经使用GUI安装程序安装了MinGW,并将mingw \\ bin添加到我的PATH中。 我运行相同的命令,但在make中有错误:

mv -f .deps/libpoker_eval_la-deck_std.Tpo .deps/libpoker_eval_la-deck_std.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../inclu
de -I../include  -Wall -Wpointer-arith -Wstrict-prototypes  -g -O2 -MT libpoker_
eval_la-enumerate.lo -MD -MP -MF .deps/libpoker_eval_la-enumerate.Tpo -c -o libp
oker_eval_la-enumerate.lo `test -f 'enumerate.c' || echo './'`enumerate.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -Wall -Wpoi
nter-arith -Wstrict-prototypes -g -O2 -MT libpoker_eval_la-enumerate.lo -MD -MP
-MF .deps/libpoker_eval_la-enumerate.Tpo -c enumerate.c  -DDLL_EXPORT -DPIC -o .
libs/libpoker_eval_la-enumerate.o
enumerate.c: In function 'enumExhaustive':
enumerate.c:415:5: error: 'intptr_t' undeclared (first use in this function)
enumerate.c:415:5: note: each undeclared identifier is reported only once for ea
ch function it appears in
make[1]: *** [libpoker_eval_la-enumerate.lo] Error 1
make[1]: Leaving directory `/drive/eval/lib'
make: *** [all-recursive] Error 1

完整的控制台日志在这里http://dl.dropbox.com/u/12053587/mylog.txt

你能帮我解决一下这个问题吗? 谢谢

你需要添加:

#include <stdint.h>

在enumerate.c文件中。 这将使您超过此错误,但您很可能必须将此行添加到多个文件中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM