{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/1124","repository_url":"https://api.github.com/repos/facebook/rocksdb","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/1124/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/1124/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/1124/events","html_url":"https://github.com/facebook/rocksdb/issues/1124","id":155342601,"number":1124,"title":"Need help configuring RocksDB to Windows 10 Visual Studio c++","user":{"login":"HawleyJean","id":7003288,"avatar_url":"https://avatars.githubusercontent.com/u/7003288?v=3","gravatar_id":"","url":"https://api.github.com/users/HawleyJean","html_url":"https://github.com/HawleyJean","followers_url":"https://api.github.com/users/HawleyJean/followers","following_url":"https://api.github.com/users/HawleyJean/following{/other_user}","gists_url":"https://api.github.com/users/HawleyJean/gists{/gist_id}","starred_url":"https://api.github.com/users/HawleyJean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HawleyJean/subscriptions","organizations_url":"https://api.github.com/users/HawleyJean/orgs","repos_url":"https://api.github.com/users/HawleyJean/repos","events_url":"https://api.github.com/users/HawleyJean/events{/privacy}","received_events_url":"https://api.github.com/users/HawleyJean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-17T19:32:52Z","updated_at":"2016-05-17T20:19:55Z","closed_at":null,"body":"Hey guys!\r\n\r\nWorking on a Visual Studio C++ project at the moment in Windows 10. I'm not very fimiliar with configuration and setting path environments, so I was wondering if I could get some help with that. \r\n\r\nI looked at the CMakeLists.txt file and wasn't sure about the steps. \r\n\r\n\"Step 1: Update paths to third-party libraryes in thirdparty.inc file\" Im not sure whether to go into my environment variables , nor what to type, or if I should edit the thirdparty.inc file.\r\n\r\nStep 3: run cmake to generate project files. - Not sure what files to start on this, are there dependancies that I should have downloaded?\r\n\r\nAny help is aprpeciated!\r\nHawley"},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/219840926","html_url":"https://github.com/facebook/rocksdb/issues/1124#issuecomment-219840926","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/1124","id":219840926,"user":{"login":"yuslepukhin","id":11303988,"avatar_url":"https://avatars.githubusercontent.com/u/11303988?v=3","gravatar_id":"","url":"https://api.github.com/users/yuslepukhin","html_url":"https://github.com/yuslepukhin","followers_url":"https://api.github.com/users/yuslepukhin/followers","following_url":"https://api.github.com/users/yuslepukhin/following{/other_user}","gists_url":"https://api.github.com/users/yuslepukhin/gists{/gist_id}","starred_url":"https://api.github.com/users/yuslepukhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuslepukhin/subscriptions","organizations_url":"https://api.github.com/users/yuslepukhin/orgs","repos_url":"https://api.github.com/users/yuslepukhin/repos","events_url":"https://api.github.com/users/yuslepukhin/events{/privacy}","received_events_url":"https://api.github.com/users/yuslepukhin/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T20:19:54Z","updated_at":"2016-05-17T20:19:54Z","body":"@HawleyJean \r\n3rd party libraries are all optional and you do not need them to build and run RocksDB.\r\n\r\nYou may want to clone gflags library from github since some tools require it and build it or download   [gflags2.2](https://github.com/gflags/gflags/archive/v2.1.2.zip) which is used on Linux and build it. \r\n\r\nYou can use this PowerShell snippet for a script\r\n\r\n`(New-Object Net.WebClient).DownloadFile('https://github.com/gflags/gflags/archive/v2.1.2.zip', 'gflags.zip')\r\nAdd-Type -assembly \"system.io.compression.filesystem\"\r\n[io.compression.zipfile]::ExtractToDirectory(\".\\gflags.zip\", \"c:\\dev\\oss\")`\r\n\r\nYou can also get a of Jemalloc for a high perf memory allocator but it is also optional\r\n\r\nYes, you can edit thirdparty.inc just as it is written or you can set appropriate env variable. The latter may be preferred.\r\n\r\nFor gflags you will need to set GFLAGS_INCLUDE, GFLAGS_LIB_DEBUG, GFLAGS_LIB_RELEASE which is include folder and full paths to the built libraries.\r\n\r\nFor all of that you will need CMake tool. Also you will need [Git](https://github.com/git-for-windows/git/releases/latest) in the path so CMake can fine it.\r\n\r\nOpen Developer Command Prompt from the Studio installation, that will give you a console window with paths to the toolchain set.\r\n\r\ncd to your rocksdb repo, \r\n\r\n`md build && cd build`. You are not mentioning the version of your studio. For VC15 use this from the build folder.\r\n\r\n`cmake -G \"Visual Studio 14 Win64\" -DGFLAGS=1 ..`\r\n\r\nThat will create a solution for your which you can either build from a command line:\r\n\r\n`msbuild /m rocksdb.sln` (recommended)\r\n\r\nor open, build, run, debug  from a studio:\r\n\r\n`devenv rocksdb.sln`\r\n\r\nyou can run tests in parallel using\r\n\r\n`.\\build_tools\\run_ci_db_test.ps1 -Run <db_test|db_test2|tests> -WorkFolder f:\\db -Concurrency 8`\r\n\r\nSee the script for the explanation of the arguments. `db_test` and `db_test2` contain multiple tests that the script will run in parallel. Tests will run `*_test.exe` executable. Concurrency will allow you to set the number of concurrent tests to run at the same time to maximize the use of your available cores otherwise it may take a really long time.\r\n\r\n-Workfolder may help you redirect the work space of your tests to an alternative location such as SSD or RAM drive to speed things up. By default test cases create databases in TMP/TEMP or TEST_TMPDIR is set. So if your TEST_TMPDIR is already set you do not need that argument.\r\n2GB of RAM drive will be enough. You can get IMDISK or other solutions of your choice."}}