@xeroc @abit @roadscape please give me a tutorial for how to use visual studio

Started by twitter, December 07, 2015, 07:27:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jakub

Quote from: cube on January 17, 2016, 08:43:21 AM
Quote from: jakub on January 17, 2016, 08:34:17 AM
Quote from: cube on January 17, 2016, 08:05:12 AM
I had similar problems too. But after I recompiled boost and the rest (ie clean recompiled everything and I did not use the pre-made binaries), the problem no longer there.

And did you manage to overcome those two issues?
(1) The _WEBSOCKETPP_NOEXCEPT_ variable is undefined
(2) std::max does not compile unless you add #include <algorithm> in fee_schedule.cpp.

Quote
(1) In the preprocessor settings for the fc project add a new definition for a variable called _WEBSOCKETPP_NOEXCEPT_.
To do that, right-click on the fc project, open the properties panel, navigate to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions and add _WEBSOCKETPP_NOEXCEPT_ to the list.

(2) In the graphene_chain project open a source file called fee_schedule.cpp and below line 22
#include <fc/smart_ref_impl.hpp>
add a new line with this content:
#include <algorithm>.

No. I did not make any changes to the source codes.

So those might be the issues that come up in VS 2015 only.

cube

Quote from: jakub on January 17, 2016, 08:34:17 AM
Quote from: cube on January 17, 2016, 08:05:12 AM
I had similar problems too. But after I recompiled boost and the rest (ie clean recompiled everything and I did not use the pre-made binaries), the problem no longer there.

And did you manage to overcome those two issues?
(1) The _WEBSOCKETPP_NOEXCEPT_ variable is undefined
(2) std::max does not compile unless you add #include <algorithm> in fee_schedule.cpp.

Quote
(1) In the preprocessor settings for the fc project add a new definition for a variable called _WEBSOCKETPP_NOEXCEPT_.
To do that, right-click on the fc project, open the properties panel, navigate to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions and add _WEBSOCKETPP_NOEXCEPT_ to the list.

(2) In the graphene_chain project open a source file called fee_schedule.cpp and below line 22
#include <fc/smart_ref_impl.hpp>
add a new line with this content:
#include <algorithm>.

No. I did not make any changes to the source codes. 
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

abit

Imo no need to change source code. will check why.

//Update:
Yes, in the end I find that pre-built boost binary hard to use, so I compiled one by myself.
I did use pre-built OpenSSL binaries.

//Update2:
I remember that default options for build boost doesn't work, so I did have to add some parameters to have it built, set target as x64 or so.
BitShares committee member: abit
BitShares witness: in.abit

jakub

Quote from: cube on January 17, 2016, 08:05:12 AM
I had similar problems too. But after I recompiled boost and the rest (ie clean recompiled everything and I did not use the pre-made binaries), the problem no longer there.

And did you manage to overcome those two issues?
(1) The _WEBSOCKETPP_NOEXCEPT_ variable is undefined
(2) std::max does not compile unless you add #include <algorithm> in fee_schedule.cpp.

Quote
(1) In the preprocessor settings for the fc project add a new definition for a variable called _WEBSOCKETPP_NOEXCEPT_.
To do that, right-click on the fc project, open the properties panel, navigate to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions and add _WEBSOCKETPP_NOEXCEPT_ to the list.

(2) In the graphene_chain project open a source file called fee_schedule.cpp and below line 22
#include <fc/smart_ref_impl.hpp>
add a new line with this content:
#include <algorithm>.

cube

I had similar problems too. But after I recompiled boost and the rest (ie clean recompiled everything and I did not use the pre-made binaries), the problem no longer there.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

jakub

Quote from: cube on January 17, 2016, 06:41:09 AM
I have been compiling bitshares Windows cmd tools without any need to change the cmake configuration files.  I use Win7 64bit and VS2013.

I've encountered two issues:

(1) For reasons unknown to me bitshares-2\libraries\fc\CMakeModules\FindBoost.cmake is unable to locate Boost libraries unless you comment out line 35 in bitshares-2\CMakeLists.txt
Once CMake finds Boost libraries, you can remove the change and CMake will work just fine. So this amendment is only needed for the very first time CMake is run.
# list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules" )
(2) For reasons unknown to me bitshares-2\libraries\fc\GitVersionGen\GetGitRevisionDescription.cmake is unable to locate the github settings and as a result it inserts the string GIT-NOTFOUND into the source code which is treated as an unknown variable by the C++ compilator.


cube

I have been compiling bitshares Windows cmd tools without any need to change the cmake configuration files.  I use Win7 64bit and VS2013.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

jakub

@twitter @Louis @xeroc

As promised, this is a detailed guide how to compile BitShares 2.0 on Windows 7 & 10 (64-bit, using Visual Studio 2015):
https://github.com/neura-sx/neura-sx.github.io/blob/master/BUILD_WIN64.md

It's a preliminary version, I'll be improving it and once it's fully tested I'll be happy to move it to the BitShares repository.
Disclaimer: I've tested it on two machines (Win 7 and Win 10) but there might still be some mistakes or omission in it.

Also, I needed to apply those little hacks to make it work:
- two little amendments in the CMake files
- one fix in an include statement in one of the source files
- one preprocessor definition added in Visual Studio

It's possible those issues could be fixed more elegantly - so if anybody has any suggestions I'll be happy to improve the process.



xeroc


jakub

I've recently managed to compile BitShares 2.0 on Windows 10 (64 bit) for Visual Studio 2015.
It was quite a battle as the current documentation is very inadequate - there are lots of traps not mentioned there.

I'll release a guide as soon as I manage to test the procedure on a separate machine.

cube

Quote from: testz on December 08, 2015, 08:19:48 AM
Quote from: twitter on December 07, 2015, 07:27:29 PM
@xeroc @abit @roadscape  please give me a tutorial for how to use visual studio to compile bitshare2.0 project(solution )?

can anyone share the visual studio solution here......????

Thanks @cube for instruction: https://bitsharestalk.org/index.php/topic,18346.msg235098.html#msg235098

This is actual commit which not yet merged to github here: https://github.com/cryptonomex/graphene/blob/3745050e318af654c46cc5b7e89b1db0aad831c3/BUILD_WIN32.md

Thanks testz for bringing the relevant thread up.  The build instruction was meant for cli_wallet and the full nodes.  IIRC, the visual studio solution file needs to be generated from the cmake. You can try that.  I have not tried building the light wallet yet since the dev team is always so prompt in releasing one.  What are the programs you want to build?
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

abit

Quote from: twitter on December 07, 2015, 08:02:22 PM
@alt  @abit both of them look like have more experience in windows
Quote from: roadscape on December 07, 2015, 07:55:01 PM
Sorry, only have Linux/OSX experience
Sorry I've only succeeded with Linux, dunno if alt did with windows.
Maybe @cgafeng knows more about windows.
BitShares committee member: abit
BitShares witness: in.abit

testz

Quote from: twitter on December 07, 2015, 07:27:29 PM
@xeroc @abit @roadscape  please give me a tutorial for how to use visual studio to compile bitshare2.0 project(solution )?

can anyone share the visual studio solution here......????

Thanks @cube for instruction: https://bitsharestalk.org/index.php/topic,18346.msg235098.html#msg235098

This is actual commit which not yet merged to github here: https://github.com/cryptonomex/graphene/blob/3745050e318af654c46cc5b7e89b1db0aad831c3/BUILD_WIN32.md

xeroc

Quote from: twitter on December 07, 2015, 08:23:14 PM
Quote from: xeroc on December 07, 2015, 07:45:31 PM
Sorry, cant help. Only Linux machines here :)

which IDE do you use under linux for bitshare2 debugging

I am not debugging bitshares2 at all since I am not a  C++ coder ... (yet)
If I was, I would probably use gdb .. but google knows them all

Thom

Back in the day (10 years ago or thereabouts) I used visual studio to run Windows builds, but what you're asking would be quite difficult for me now. I have long since jettisoned Microsoft dev tools in favor of the Linux OS and its toolset. Windows dev is quite a different mindset.

My Windows dev skills for a task like this are just too dated. I'm not your guy.
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: [url="https://bitsharestalk.org/index.php/topic,23902.0.html"]https://bitsharestalk.org/index.php/topic,23902.0.html[/url]