使用 MinGW 为 Windows 构建 Linux 库
有一个带有 make 脚本的 Linux 库源。 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
你能帮我解决这个问题吗? 谢谢
There is a lib sources for linux with make scripts.
http://svn.gna.org/svn/pokersource/branches/poker-eval-java/.
I need to build it for windows. It should be two dll. The main dll and the second dll is jni-wrapper to call the native functions from java.
I have built it under the linux with such commands:
autoreconf --install
./configure --enable-java
make
It was built successfully and works fine. But now I need to make it for windows.
I've installed the MinGW with GUI installer and add mingw\bin to my PATH.
I run the same commands but have the error in 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
Full console log is here
http://dl.dropbox.com/u/12053587/mylog.txt
Could you help me to solve the problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要
在 enumerate.c 文件中 添加:这将使您克服这一错误,但很可能您必须将这一行添加到多个文件中。
you need to add:
in the enumerate.c file. This will get you past this error, but it's most likely you'll have to add this line to more than one file.