简体   繁体   中英

Build a linux library for windows with MinGW

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

you need to add:

#include <stdint.h>

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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