我正在尝试修改oclvanitygen [link],我已经做了一些。现在我需要测试它,但是我在Windows 7上编译它时遇到了问题。我正在VC ++ 2010 Express中使用VS命令提示符来运行makefile。 makefile的相关部分,由我修改:
CC = cl
OPENSSL_DIR = [Working Dir]\openssl
PTHREADS_DIR = [Working Dir]\pthread
PCRE_DIR = [Working Dir]\pcre
CURL_DIR = C:\curl-7.26.0-x86\builds\libcurl-release-static-ssl-static-ipv6-sspi
OPENCL_DIR = [Working Dir]\openCL
OPENCL_INCLUDE = /I$(OPENCL_DIR)\include
OPENCL_LIBS = $(OPENCL_DIR)\OpenCL.lib
CURL_INCLUDE = /I$(CURL_DIR)\include /DCURL_STATICLIB
CURL_LIBS = $(CURL_DIR)\lib\libcurl_a.lib
CFLAGS_BASE = /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /I$(OPENSSL_DIR)\inc32 /I$(PTHREADS_DIR) /I$(PCRE_DIR) /Ox /Zi
CFLAGS = $(CFLAGS_BASE) /GL
LIBS = $(OPENSSL_DIR)\out32\libeay32.lib $(PTHREADS_DIR)\pthreadVC2.lib $(PCRE_DIR)\pcre.lib ws2_32.lib user32.lib advapi32.lib gdi32.lib /LTCG /DEBUG
OBJS = vanitygen.obj oclvanitygen.obj oclengine.obj oclvanityminer.obj keyconv.obj pattern.obj util.obj winglue.obj
all: vanitygen.exe keyconv.exe
vanitygen.exe: vanitygen.obj pattern.obj util.obj winglue.obj
link /nologo /out:$@ $** $(LIBS)
oclvanitygen.exe: oclvanitygen.obj oclengine.obj pattern.obj util.obj winglue.obj
link /nologo /out:$@ $** $(LIBS) $(OPENCL_LIBS)
oclvanityminer.exe: oclvanityminer.obj oclengine.obj pattern.obj util.obj winglue.obj
link /nologo /out:$@ $** $(LIBS) $(OPENCL_LIBS) $(CURL_LIBS)
keyconv.exe: keyconv.obj util.obj winglue.obj
link /nologo /out:$@ $** $(LIBS)
.c.obj:
@$(CC) /nologo $(CFLAGS) /c /Tp$< /Fo$@
oclengine.obj: oclengine.c
@$(CC) /nologo $(CFLAGS_BASE) $(OPENCL_INCLUDE) /c /Tpoclengine.c /Fo$@
oclvanitygen.obj: oclvanitygen.c
@$(CC) /nologo $(CFLAGS_BASE) /c /Tpoclvanitygen.c /Fo$@
oclvanityminer.obj: oclvanityminer.c
@$(CC) /nologo $(CFLAGS_BASE) $(CURL_INCLUDE) /c /Tpoclvanityminer.c /Fo
clean:
del vanitygen.exe oclvanitygen.exe oclvanityminer.exe keyconv.exe $(OBJS)
然后我使用命令
nmake /fmakefile.win32 oclvanitygen.exe
失败并出现以下错误:
link /nologo /out:oclvanitygen.exe oclvanitygen.obj oclengine.obj pattern.obj util.obj winglue.obj [Working Dir]\openssl\out32\libeay32.lib [Working Dir]\pthread\pthreadVC2.lib [Working Dir]\pcre\pcre.lib ws2_32.lib user32.lib advapi32.lib gdi32.lib [Working Dir]\openCL\OpenCL.lib /LTCG /DEBUG
LINK : fatal error LNK1117: syntax error in option ''
NMAKE: fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x45d'
我做错了什么?所有头文件和库都在正确的位置。