使用make腳本有一個lib源代碼用於Linux。 http://svn.gna.org/svn/pokersource/branches/poker-eval-java/。 我需要爲Windows構建它。它應該是兩個DLL。主dll和第二個dll是jni-wrapper來從java調用本地函數。 我已經把它在Linux下用這樣的命令:使用MinGW爲windows創建一個linux庫
autoreconf --install
./configure --enable-java
make
它已成功建成並正常工作。但現在我需要爲Windows創建它。 我用GUI安裝程序安裝了MinGW,並將mingw \ bin添加到我的PATH中。 我運行相同的命令,但有錯誤的化妝:
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
你能幫我解決這個問題? 感謝
你正在使用哪個mingw-g ++版本? – smerlin 2011-03-30 11:46:19
這與Java有什麼關係? – 2011-03-30 11:52:40
這是一個本機庫,帶有用於java的dll-wrapper - Java Native Interface。我可以用cygwin for windows構建它。但它不起作用。導致jvm崩潰。 – NullPointer 2011-03-30 11:56:14