Explicitly link in ws2_32 on the windows build and update README file on how to compile successfully on windows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/Makefile.am b/Makefile.am
index 0fed929..35e3650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,7 @@ cgminer_SOURCES = elist.h miner.h compat.h bench_block.h \
phatk110816.cl poclbm110816.cl
cgminer_LDFLAGS = $(PTHREAD_FLAGS)
-cgminer_LDADD = @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ lib/libgnu.a ccan/libccan.a
+cgminer_LDADD = @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ lib/libgnu.a ccan/libccan.a
cgminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib
if HAVE_x86_64
diff --git a/README b/README
index 9cda62d..79dfcd6 100644
--- a/README
+++ b/README
@@ -56,13 +56,15 @@ Basic WIN32 build instructions (on Fedora 13; requires mingw32):
./mknsis.sh
Native WIN32 build instructions (on mingw32, on windows):
- Install AMD APP sdk, latest version
+ Install the Microsoft platform SDK
+ Install AMD APP sdk, latest version (only if you want GPU mining)
(Do NOT install the ati amd sdk if you are on nvidia)
Install mingw32
Install libcurl, copy libcurl.m4 into /mingw/share/aclocal
+ Install pkg-config, copy pkg.m4 into /mingw/share/aclocal
Run:
autoreconf -fvi
- CFLAGS="-O2 -Wall -msse2 -I<path to AMD APP include>" LDFLAGS="-L<path to AMD APP lib/x86>" ./configure
+ CFLAGS="-O2 -msse2" ./configure
make
Usage instructions: Run "cgminer --help" to see options.
diff --git a/configure.ac b/configure.ac
index d66885f..f480ed5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@ AC_FUNC_ALLOCA
have_win32=false
PTHREAD_FLAGS="-pthread"
OPENCL_FLAGS="-lOpenCL"
+WS2_LIBS=""
case $target in
x86_64-*)
@@ -43,6 +44,7 @@ case $target in
have_x86_64=false
have_win32=true
PTHREAD_FLAGS=""
+ WS2_LIBS="-lws2_32"
;;
*-*-darwin*)
OPENCL_FLAGS="-framework OpenCL"
@@ -167,6 +169,7 @@ AC_SUBST(PTHREAD_FLAGS)
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(NCURSES_LIBS)
AC_SUBST(PDCURSES_LIBS)
+AC_SUBST(WS2_LIBS)
AC_CONFIG_FILES([
Makefile