Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

build with vs2015 error #297

Closed
winnerwoo opened this issue Sep 8, 2017 · 3 comments
Closed

build with vs2015 error #297

winnerwoo opened this issue Sep 8, 2017 · 3 comments

Comments

@winnerwoo
Copy link

Please help me,the VS2015 build output display is:

10>jsonrpccpp-client.lib (httpclient.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-client.lib (httpclient.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-client.lib (client.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-client.lib (client.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-client.lib (batchcall.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-client.lib (batchcall.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-client.lib (batchresponse.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-client.lib (batchresponse.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-client.lib (rpcprotocolclient.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-client.lib (rpcprotocolclient.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (tcpsocketserver.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (tcpsocketserver.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (abstractserverconnector.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (abstractserverconnector.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (requesthandlerfactory.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (requesthandlerfactory.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (windowstcpsocketserver.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (windowstcpsocketserver.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserverv1.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserverv1.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserverv2.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserverv2.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserver12.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (rpcprotocolserver12.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-server.lib (abstractprotocolhandler.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-server.lib (abstractprotocolhandler.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-common.lib (exception.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-common.lib (exception.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-common.lib (errors.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-common.lib (errors.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsonrpccpp-common.lib (procedure.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsonrpccpp-common.lib (procedure.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsoncpp.lib (json_value.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsoncpp.lib (json_value.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsoncpp.lib (json_reader.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsoncpp.lib (json_reader.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>jsoncpp.lib (json_writer.obj): error LNK2038: detected "_ITERATOR_DEBUG_LEVEL" does not match: the value of "0" not matching value "2" (main.obj)
10>jsoncpp.lib (json_writer.obj): error LNK2038: detected "RuntimeLibrary" does not match the value: "MD_DynamicRelease" is not matching value "MDd_DynamicDebug" (main.obj)
10>LINK: warning LNK4098:, the default library "MSVCRT" conflicts with the use of other libraries. Use /NODEFAULTLIB:library
10>C:\Users\Administrator\Desktop\Zhizu\ethminer\Debug\ethminer.exe: fatal error LNK1319: detected 38 mismatches
11>------ has started generating: Project: ALL_BUILD, configuration: Debug, x64 ---
11>, Building, Custom, Rule, C:/ethminer0120rc1/CMakeLists.txt
11>, CMake, does, not, need, to, re-run, because,, C:/Users/Administrator/Desktop/Zhizu/CMakeFiles/generate.stamp, is, up-to-date.
12>------ has skipped build: Project: INSTALL, configuration: Debug, x64 ---
12> is not configured for this solution. Select the project you want to generate
13>------ has skipped build: Project: PACKAGE, configuration: Debug, x64 ---
13> is not configured for this solution. Select the project you want to generate
========== generation: the success of 9, failed in 1, the new 0, jump 3 ==========

@smurfy
Copy link
Collaborator

smurfy commented Sep 8, 2017

can you please provide me with the commandline for cmake?
Also it looks like you compiling with Debug Configuration. At least i did never manage to compile for debug. always compile "Release" or "RelWithDebInfo"

@joseortiz3
Copy link

joseortiz3 commented Jan 16, 2018

I have this same issue. I have both VS2015 and 2017 compilers in 32 and 64 bit. For CUDA, it seems only VS2015 64bit compiler is compatible. So I run

git clone https://github.com/ethereum-mining/ethminer.git
cd ethminer
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015 Win64" -DETHASHCL=OFF -DETHASHCUDA=ON
cmake --build .

and I get the same 38 linker errors as the first poster. Not sure how to specify to cmake how to compile release.

EDIT: I had to delete my pre-existing /home/.hunter/ directory (from previous failed install I did) and fully delete and re-clone the repo. Executing

git clone https://github.com/ethereum-mining/ethminer.git
cd ethminer
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015 Win64" -DETHASHCL=OFF -DETHASHCUDA=ON
cmake --build . --config Release

actually worked. Wow. Only took two hours to figure this out...wish the documentation was more detailed.

@DeadManWalkingTO
Copy link
Contributor

I think this issue can be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants