BitShares Forum

Main => General Discussion => Topic started by: twitter on December 07, 2015, 07:27:29 pm

Title: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: 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......????


@puppies
@lafona
@merockstar
@mike623317
@JWF
@xeroc
@pal
@MJK
@EstefanTT
@jabbajabbaつ◕_◕つ
@Thom
@emailtooaj
@Fox
@lil_jay890
@Tuck Fheman
@rgcrypto
@cube
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: puppies on December 07, 2015, 07:39:05 pm
Sorry man.  I can't help at all.  I haven't built 2.0 on Windows at all.  Are you looking to build bitshares, or the light client? 
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: twitter on December 07, 2015, 07:44:04 pm
ideally both.  puppies  ,could you please show me how to build light client in windows ?
Sorry man.  I can't help at all.  I haven't built 2.0 on Windows at all.  Are you looking to build bitshares, or the light client?
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: xeroc on December 07, 2015, 07:45:31 pm
Sorry, cant help. Only Linux machines here :)
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: fuzzy on December 07, 2015, 07:47:47 pm
I will be handing out HIGFIVES, FISTBUMPS, BROWNIES (a token to receive a sharebits sharedrop), MEGUSTA and any other sponsored tokens to those who help provide this tutorial. 

If you would like to sponsor this initiative with a token of your own please let me know and ill send it for you ir you can send it yourself!
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: roadscape on December 07, 2015, 07:55:01 pm
Sorry, only have Linux/OSX experience
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: twitter on December 07, 2015, 08:02:22 pm
@alt  @abit both of them look like have more experience in windows
Sorry, only have Linux/OSX experience
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: twitter on December 07, 2015, 08:23:14 pm
Sorry, cant help. Only Linux machines here :)

which IDE do you use under linux for bitshare2 debugging
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: alt on December 07, 2015, 10:25:17 pm
@alt  @abit both of them look like have more experience in windows
Sorry, only have Linux/OSX experience
sorry, only Linux experience
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: BTSdac on December 08, 2015, 01:32:34 am
I have compiled cli_wallet.exe and witness, but cannot compile light-wallet.exe  because lack of files
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: Thom on December 08, 2015, 02:43:06 am
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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: xeroc on December 08, 2015, 07:37:17 am
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
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: testz on December 08, 2015, 08:19:48 am
@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
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: abit on December 08, 2015, 11:24:30 am
@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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: cube on December 08, 2015, 11:37:13 am
@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?
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: jakub on January 14, 2016, 08:49:17 pm
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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: xeroc on January 15, 2016, 07:34:38 am
I'll release a guide as soon as I manage to test the procedure on a separate machine.
+5%!!
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: jakub on January 16, 2016, 09:17:51 pm
@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.


Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: 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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: jakub on January 17, 2016, 07:54:56 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.
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.

Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: 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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: jakub on January 17, 2016, 08:34:17 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>.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: abit on January 17, 2016, 08:39:31 am
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.
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: cube on January 17, 2016, 08:43:21 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. 
Title: Re: @xeroc @abit @roadscape please give me a tutorial for how to use visual studio
Post by: jakub on January 17, 2016, 09:46:05 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.