簡體   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