Author Topic: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio  (Read 5972 times)

0 Members and 1 Guest are viewing this topic.

jakub

  • Guest
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.

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
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.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
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.
« Last Edit: January 17, 2016, 08:47:19 am by abit »
BitShares committee member: abit
BitShares witness: in.abit

jakub

  • Guest
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>.

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
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

  • Guest
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.
Code: [Select]
# 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.

« Last Edit: January 17, 2016, 08:21:51 am by jakub »

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
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

  • Guest
@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.


« Last Edit: January 17, 2016, 01:22:36 am by jakub »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I'll release a guide as soon as I manage to test the procedure on a separate machine.
+5%!!

jakub

  • Guest
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.

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
@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?
« Last Edit: December 08, 2015, 11:46:29 am by cube »
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
@alt  @abit both of them look like have more experience in windows
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

Offline testz

@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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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

Offline 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: https://bitsharestalk.org/index.php/topic,23902.0.html