Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue compiling under Visual Studio 2017 #16

Open
SnackyC opened this issue Sep 2, 2018 · 9 comments
Open

Issue compiling under Visual Studio 2017 #16

SnackyC opened this issue Sep 2, 2018 · 9 comments

Comments

@SnackyC
Copy link

SnackyC commented Sep 2, 2018

C2678 binary '==': no operator found which takes a left-hand operand of type 'boost::asio::ip::tcp::endpoint' (or there is no acceptable conversion) in stratum.cpp 196

2>C:\Users\Dev\Desktop\Miners\libmeritminer\src\stratum\stratum.cpp(196): error C2678: binary '==': no operator found which takes a left-hand operand of type 'boost::asio::ip::tcp::endpoint' (or there is no acceptable conversion)
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\guiddef.h(192): note: could be 'bool operator ==(const GUID &,const GUID &)'
2>C:\boost\include\boost-1_66\boost/asio/ip/address_v4.hpp(167): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::address_v4 &,const boost::asio::ip::address_v4 &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/impl/address_v6.ipp(232): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::address_v6 &,const boost::asio::ip::address_v6 &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/impl/address.ipp(210): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::address &,const boost::asio::ip::address &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/address_v4_iterator.hpp(138): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::basic_address_iterator<boost::asio::ip::address_v4> &,const boost::asio::ip::basic_address_iterator<boost::asio::ip::address_v4> &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/address_v6_iterator.hpp(159): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::basic_address_iterator<boost::asio::ip::address_v6> &,const boost::asio::ip::basic_address_iterator<boost::asio::ip::address_v6> &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/icmp.hpp(88): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::icmp &,const boost::asio::ip::icmp &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/tcp.hpp(130): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::tcp &,const boost::asio::ip::tcp &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/udp.hpp(86): note: or       'bool boost::asio::ip::operator ==(const boost::asio::ip::udp &,const boost::asio::ip::udp &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/basic_endpoint.hpp(190): note: or       'bool boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>::operator ==(const boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> &,const boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> &)' [found using argument-dependent lookup]
2>C:\boost\include\boost-1_66\boost/asio/ip/basic_resolver_iterator.hpp(144): note: or       'bool boost::asio::ip::basic_resolver_iterator<InternetProtocol>::operator ==(const boost::asio::ip::basic_resolver_iterator<InternetProtocol> &,const boost::asio::ip::basic_resolver_iterator<InternetProtocol> &)' [found using argument-dependent lookup]
2>        with
2>        [
2>            InternetProtocol=boost::asio::ip::tcp
2>        ]
2>C:\boost\include\boost-1_66\boost/asio/ip/basic_resolver_results.hpp(290): note: or       'bool boost::asio::ip::basic_resolver_results<Protocol>::operator ==(const boost::asio::ip::basic_resolver_results<Protocol> &,const boost::asio::ip::basic_resolver_results<Protocol> &)' [found using argument-dependent lookup]
2>        with
2>        [
2>            Protocol=boost::asio::ip::tcp
2>        ]
2>C:\Users\Dev\Desktop\Miners\libmeritminer\src\stratum\stratum.cpp(196): note: while trying to match the argument list '(boost::asio::ip::tcp::endpoint, boost::asio::ip::basic_resolver_iterator<InternetProtocol>)'
2>        with
2>        [
2>            InternetProtocol=boost::asio::ip::tcp
2>        ]
@SnackyC
Copy link
Author

SnackyC commented Sep 4, 2018

This error was fixed by the last commit (thank you for working so quickly), but I stumbled upon another one:

https://stackoverflow.com/questions/2561368/illegal-token-on-right-side-of
on line 113 of minerd.cpp

I tried to implement the solutions on the page, adding #undef max caused this problem
https://stackoverflow.com/questions/28887001/lnk2038-mismatch-detected-for-runtimelibrary-value-mt-staticrelease-doesn

changing it to
cores = (std::numeric_limits<T>::max)(0, cores);
didn't work for me either, but I'm not familiar with C++ and not sure how to declare the template.

@lanciaominer
Copy link

what are the steps and requirements to compile this on windows ? hope a windows binary release would be available. Thanks again so much

@Retsediv
Copy link
Contributor

Retsediv commented Sep 6, 2018

@SnackyC @lanciaominer
You can download windows binary release here
When there is a new version of libmeritminer we post about it in Discord #announcement channel with links to the binaries.

@Retsediv
Copy link
Contributor

Retsediv commented Sep 6, 2018

@SnackyC Could you post the output from the console during the compilation?

Maybe try: cores = (std::numeric_limits<int>::max)(0, cores);

@lanciaominer
Copy link

@Retsediv Thanks for the heads up, but i hope you can provide a windows binary release with the solo mining feature from the solo-mining branch as well. Thanks man

@Retsediv
Copy link
Contributor

Retsediv commented Sep 6, 2018

@lanciaominer not yet, solo mining is still under development

@SnackyC
Copy link
Author

SnackyC commented Sep 6, 2018

pulled the September 5 commit, issue persists, here's the console:

4>------ Rebuild All started: Project: merit-minerd, Configuration: Release x64 ------
4>Building Custom Rule C:/Users/Dev/Desktop/Miners/libmeritminer/CMakeLists.txt
4>CMake does not need to re-run because C:/Users/Dev/Desktop/Miners/libmeritminer/build/CMakeFiles/generate.stamp is up-to-date.
4>cl : Command line warning D9002: ignoring unknown option '-fPIC'
4>minerd.cpp
4>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version.  Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(113): error C2589: '(': illegal token on right side of '::'
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(113): error C2062: type 'unknown-type' unexpected
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(113): error C2059: syntax error: ')'
4>Done building project "merit-minerd.vcxproj" -- FAILED.

With @Retsediv's suggestion of cores = (std::numeric_limits<int>::max)(0, cores);:

4>------ Rebuild All started: Project: merit-minerd, Configuration: Release x64 ------
4>Building Custom Rule C:/Users/Dev/Desktop/Miners/libmeritminer/CMakeLists.txt
4>CMake does not need to re-run because C:/Users/Dev/Desktop/Miners/libmeritminer/build/CMakeFiles/generate.stamp is up-to-date.
4>cl : Command line warning D9002: ignoring unknown option '-fPIC'
4>minerd.cpp
4>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version.  Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(113): error C2660: 'std::numeric_limits<int>::max': function does not take 2 arguments
4>Done building project "merit-minerd.vcxproj" -- FAILED.

@lanciaominer I don't recall everything since I'm working on a few things simultaneously, but if you have cmake installed make the build directory and cmake .. and start working through errors. I recall having to compile boost and getting cmake to find both boost and cuda, once cmake finishes successfully you can open meritminer.vcxproj with the gui and compile for x64 release.

@Retsediv
Copy link
Contributor

Retsediv commented Sep 7, 2018

@SnackyC I have pushed changes into the master branch. Hopefully, it would help

@SnackyC
Copy link
Author

SnackyC commented Sep 7, 2018

Got the same error unfortunately

4>------ Rebuild All started: Project: merit-minerd, Configuration: Release x64 ------
4>Building Custom Rule C:/Users/Dev/Desktop/Miners/libmeritminer/CMakeLists.txt
4>CMake does not need to re-run because C:/Users/Dev/Desktop/Miners/libmeritminer/build/CMakeFiles/generate.stamp is up-to-date.
4>cl : Command line warning D9002: ignoring unknown option '-fPIC'
4>minerd.cpp
4>Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version.  Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(114): error C2589: '(': illegal token on right side of '::'
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(114): error C2062: type 'unknown-type' unexpected
4>C:\Users\Dev\Desktop\Miners\libmeritminer\src\minerd.cpp(114): error C2059: syntax error: ')'
4>Done building project "merit-minerd.vcxproj" -- FAILED.

Same error as previous post when trying cores = (std::numeric_limits<int>::max)(0, cores); as well.

I had tried #include <limits> as part of a previous attempt at the suggestion of the stackexchange post but it didn't work either.

Thanks for your time on this, looking forward to implementing the node-based meritminer on a windows platform with GPUs

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

No branches or pull requests

3 participants