Title: Win32 CgMiner CURL static linking Post by: Vanya228 on March 30, 2014, 04:29:17 PM Helloo, i have build libcurl with ssl support statically myself, when i try to compile a simple samples it links allright in a static executable,
but when i try to link it with cgminer 3.6.6 i get Code: c:\mingw\include\sdkddkver.h:154:0: note: this is the location of the previous d So i assume timeEndPeriod are undefined for some reason now, how do i fix that? My configuration of cgminer is Quote configure --enable-opencl --enable-adl --disable-shared CFLAGS="-DCURL_STATICLIB -DPTW32_STATIC_LIB -O2 -msse2" My configuration of libcurl is Quote configure --disable-shared --disable-ldap --with-ssl=/usr/local LIBS="-lgdi32" My configuration of openssl is Quote perl Configure mingw no-shared no-asm --prefix=/c/OpenSSL Title: Re: Win32 CgMiner CURL static linking Post by: Proteu5 on April 06, 2014, 07:45:05 AM Just solved the issue:
Add to your CFLAGS Code: -DWIN32 That solved the timeEndPeriod for me. Also, have you used the <winsock2.h> edit? I am building 4.2.2 and with less settings but did encounter the same issues. My last build had zero errors but wouldn't run. If I discover anything that could help you I'll post or edit my post. Edit:Sorry I'm also assuming you've made all necessary changes: such as -lcurl -lcurldll to libcurl.pc **Throws Hands In The Air** I'm compiling with no errors and it still or won't run or I'm getting _WIN32.... already redifined >> When I fix this I get timeradd errors... CFLAGS="-O2 -msse2 -DWIN32_LEAN_AND_MEAN -lws2_32 -lshlwapi -lmswsock" ./configure --enable-icarus Code: Minimum system required Minimum value for _WIN32_WINNT and WINVER |