{"action":"created","issue":{"url":"https://api.github.com/repos/whoshuu/cpr/issues/126","repository_url":"https://api.github.com/repos/whoshuu/cpr","labels_url":"https://api.github.com/repos/whoshuu/cpr/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/whoshuu/cpr/issues/126/comments","events_url":"https://api.github.com/repos/whoshuu/cpr/issues/126/events","html_url":"https://github.com/whoshuu/cpr/issues/126","id":171160304,"number":126,"title":"Compile in Visual Studio","user":{"login":"AliRezaBeitari","id":21037809,"avatar_url":"https://avatars.githubusercontent.com/u/21037809?v=3","gravatar_id":"","url":"https://api.github.com/users/AliRezaBeitari","html_url":"https://github.com/AliRezaBeitari","followers_url":"https://api.github.com/users/AliRezaBeitari/followers","following_url":"https://api.github.com/users/AliRezaBeitari/following{/other_user}","gists_url":"https://api.github.com/users/AliRezaBeitari/gists{/gist_id}","starred_url":"https://api.github.com/users/AliRezaBeitari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliRezaBeitari/subscriptions","organizations_url":"https://api.github.com/users/AliRezaBeitari/orgs","repos_url":"https://api.github.com/users/AliRezaBeitari/repos","events_url":"https://api.github.com/users/AliRezaBeitari/events{/privacy}","received_events_url":"https://api.github.com/users/AliRezaBeitari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-08-15T12:25:58Z","updated_at":"2016-12-21T21:12:14Z","closed_at":null,"body":"Hi!\nI cannot compile it in Visual Studio. I mean, I don't know how?!\nPlease help.\n\nThanks.\n"},"comment":{"url":"https://api.github.com/repos/whoshuu/cpr/issues/comments/268641135","html_url":"https://github.com/whoshuu/cpr/issues/126#issuecomment-268641135","issue_url":"https://api.github.com/repos/whoshuu/cpr/issues/126","id":268641135,"user":{"login":"ethanhs","id":9504279,"avatar_url":"https://avatars.githubusercontent.com/u/9504279?v=3","gravatar_id":"","url":"https://api.github.com/users/ethanhs","html_url":"https://github.com/ethanhs","followers_url":"https://api.github.com/users/ethanhs/followers","following_url":"https://api.github.com/users/ethanhs/following{/other_user}","gists_url":"https://api.github.com/users/ethanhs/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanhs/subscriptions","organizations_url":"https://api.github.com/users/ethanhs/orgs","repos_url":"https://api.github.com/users/ethanhs/repos","events_url":"https://api.github.com/users/ethanhs/events{/privacy}","received_events_url":"https://api.github.com/users/ethanhs/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T21:12:14Z","updated_at":"2016-12-21T21:12:14Z","body":"Okay, I think I've figured out a couple of things:\r\n\r\nFirst of all, everything builds fine using the normal procedure as long as you:\r\n```\r\n$ set INSECURE_CURL=ON\r\n$ set CMAKE_USE_OPENSSL=OFF\r\n```\r\nYou can then:\r\n```\r\n$ git clone https://github.com/whoshuu/cpr\r\n$ git submodule update --init\r\n$ mkdir build && cd build\r\n$ cmake ..\r\n$ cmake --build .\r\n```\r\n\r\nAnd it _should_ build fine. The first two variables are not really documented anywhere...\r\n\r\nAnyway. If you want SSL so you can do requests over HTTPS and the like, then you need to install CURL yourself. Here are my instructions for that:\r\n\r\nCURL by default builds 32bit, I'm still working on getting Win64 to compile as the cmake system doesn't quite work... I'll post Win64 instructions when I get it working.\r\n\r\nIf you want libssh2 support for things like SFTP and other ssh protocols:\r\n[use these instructions to install libssh2](https://github.com/libssh2/libssh2/blob/master/docs/INSTALL_CMAKE)\r\n\r\n```\r\n$ git clone https://github.com/curl/curl.git\r\n$ cd curl\r\n$ mkdir build32 && cd build32\r\n$ cmake ..\r\n$ cmake --build .\r\n```\r\nYou may want to verify that the WINSSL was used and that the HTTPS protocol is on. It will show this in the output after running `cmake ..`:\r\n```\r\n-- Enabled features: WinSSL IPv6 AsynchDNS Largefile SSPI SPNEGO Kerberos NTLM\r\n-- Enabled protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP\r\n```\r\n\r\nThen you need to move to an __ADMIN__ command prompt to install curl:\r\n```\r\n$ cmake --build . --target install\r\n```\r\n\r\nSo now CURL should be in C:\\Program Files (x86)\\CURL\\\r\n\r\nYou need to add that path to an environment variable named CMAKE_PREFIX_PATH. I put this in my system environment variables so I can always use CURL.\r\n\r\nSo now for the main part: building cpr.\r\n\r\n```\r\n$ git clone https://github.com/whoshuu/cpr.git\r\n$ cd cpr\r\n$ mkdir build32 && cd build32\r\n$ cmake .. -DUSE_SYSTEM_CURL\r\n$ cmake --build .\r\n```\r\nThe binaries should be useable now!"}}
{"actor":{"display_login":"ethanhs"}}