{"action":"opened","issue":{"url":"https://api.github.com/repos/nghttp2/nghttp2/issues/1194","repository_url":"https://api.github.com/repos/nghttp2/nghttp2","labels_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/1194/labels{/name}","comments_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/1194/comments","events_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/1194/events","html_url":"https://github.com/nghttp2/nghttp2/issues/1194","id":335994856,"node_id":"MDU6SXNzdWUzMzU5OTQ4NTY=","number":1194,"title":"How to build the static library for Windows?","user":{"login":"rixtox","id":2001277,"node_id":"MDQ6VXNlcjIwMDEyNzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2001277?v=4","gravatar_id":"","url":"https://api.github.com/users/rixtox","html_url":"https://github.com/rixtox","followers_url":"https://api.github.com/users/rixtox/followers","following_url":"https://api.github.com/users/rixtox/following{/other_user}","gists_url":"https://api.github.com/users/rixtox/gists{/gist_id}","starred_url":"https://api.github.com/users/rixtox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rixtox/subscriptions","organizations_url":"https://api.github.com/users/rixtox/orgs","repos_url":"https://api.github.com/users/rixtox/repos","events_url":"https://api.github.com/users/rixtox/events{/privacy}","received_events_url":"https://api.github.com/users/rixtox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T21:19:38Z","updated_at":"2018-06-26T21:19:38Z","closed_at":null,"author_association":"NONE","body":"I'm trying to build the static library of nghttp2 for Windows x86/x64 from source, just like those pre-built libraries provided in the [PHP-SDK](https://windows.php.net/downloads/php-sdk/deps/).\r\n\r\nI noticed there's a `Makefile.msvc` file under `nghttp2/lib`. I tried to run it with `nmake` under a `x86 Native Tools Command Prompt for VS 2017`:\r\n\r\n```\r\n> nmake /f Makefile.msvc\r\nMicrosoft (R) Program Maintenance Utility Version 14.14.26430.0\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n\r\nMakefile.msvc(13) : fatal error U1033: syntax error : '=' unexpected\r\nStop.\r\n```\r\n\r\nSo it's not a `nmake` makefile. Then I tried to run it with `make` from [GnuWin32](http://gnuwin32.sourceforge.net/packages/make.htm) in the same MSVC environment:\r\n\r\n```\r\n> make -f Makefile.msvc\r\ncut: the delimiter must be a single character\r\nTry `cut --help' for more information.\r\nsed: -e expression #1, char 1: unknown command: `''\r\nprocess_begin: CreateProcess(NULL, cygpath -w C:/nghttp2-1.32.0/lib/MSVC_obj, ...) failed. 'Building NgHTTP (MSVC) ver. \"..\".'\r\nrc -D_RELEASE -Fo MSVC_obj/r_nghttp2.res MSVC_obj/nghttp2.rc\r\nMicrosoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n\r\n\r\nMSVC_obj/nghttp2.rc(1) : error RC2135 : file not found: 'Generated\r\nmake: *** [MSVC_obj/r_nghttp2.res] Error 2\r\n```\r\n\r\nIt seems some bash syntax is not compatible with Windows CMD environment.\r\n\r\nI also have MinGW32/64 environments available but they are not configured with MSVC build tools.\r\n\r\nI also tried to build with `cmake` under MSVC:\r\n\r\n```\r\nnghttp2-1.32.0\\lib > md build32\r\nnghttp2-1.32.0\\lib > cd build32\r\nnghttp2-1.32.0\\lib\\build32 > cmake -DCMAKE_INSTALL_PREFIX=\"%PREFIX%\" -DENABLE_STATIC_LIB=YES -DCMAKE_INSTALL_LIBDIR=\"%PREFIX%\\lib\" -G \"Visual Studio 15 2017\" ..\r\nnghttp2-1.32.0\\lib\\build32 > cmake --build . --config Release --target INSTALL\r\n...\r\n  Generating Code...\r\n  Compiling...\r\n  nghttp2_rcbuf.c\r\nnghttp2-1.32.0\\lib\\includes\\nghttp2\\nghttp2.h(898): error C2143: syntax error: missing\r\n')' before '*' [nghttp2-1.32.0\\lib\\build32\\nghttp2_static.vcxproj]\r\nnghttp2-1.32.0\\lib\\includes\\nghttp2\\nghttp2.h(898): error C2143: syntax error: missing\r\n'{' before '*' [nghttp2-1.32.0\\lib\\build32\\nghttp2_static.vcxproj]\r\nnghttp2-1.32.0\\lib\\includes\\nghttp2\\nghttp2.h(898): error C2059: syntax error: ')' [nghttp2-1.32.0\\lib\\build32\\nghttp2_static.vcxproj]\r\nnghttp2-1.32.0\\lib\\includes\\nghttp2\\nghttp2.h(916): error C2061: syntax error: identifi er 'nghttp2_data_source_read_callback' [nghttp2-1.32.0\\lib\\build32\\nghttp2_static.vcxpr oj]\r\n...\r\n```\r\n\r\nThis time it gives a lot of syntax error message. I really don't know what build environment is required to build it. Can you provide some instructions?"}}
{"actor":{"display_login":"rixtox"}}