有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java使用MinGW为windows构建linux库

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

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

它建造成功,运行良好。但现在我需要为windows制作它。 我已经用GUI安装程序安装了MinGW,并将MinGW\bin添加到我的路径中。 我运行相同的命令,但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

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


共 (1) 个答案

  1. # 1 楼答案

    您需要添加:

    #include <stdint.h>
    

    在列举中。c文件。这将使您克服此错误,但很可能您必须将此行添加到多个文件中