{"action":"created","issue":{"url":"https://api.github.com/repos/vim-jp/issues/issues/769","labels_url":"https://api.github.com/repos/vim-jp/issues/issues/769/labels{/name}","comments_url":"https://api.github.com/repos/vim-jp/issues/issues/769/comments","events_url":"https://api.github.com/repos/vim-jp/issues/issues/769/events","html_url":"https://github.com/vim-jp/issues/issues/769","id":107124639,"number":769,"title":"Windows で DYNAMIC_PYTHON=yes かつ DYNAMIC_PYTHON3=no のときビルドに失敗する","user":{"login":"sgur","id":255021,"avatar_url":"https://avatars.githubusercontent.com/u/255021?v=3","gravatar_id":"","url":"https://api.github.com/users/sgur","html_url":"https://github.com/sgur","followers_url":"https://api.github.com/users/sgur/followers","following_url":"https://api.github.com/users/sgur/following{/other_user}","gists_url":"https://api.github.com/users/sgur/gists{/gist_id}","starred_url":"https://api.github.com/users/sgur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgur/subscriptions","organizations_url":"https://api.github.com/users/sgur/orgs","repos_url":"https://api.github.com/users/sgur/repos","events_url":"https://api.github.com/users/sgur/events{/privacy}","received_events_url":"https://api.github.com/users/sgur/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vim-jp/issues/labels/kind/bug","name":"kind/bug","color":"e10c02"},{"url":"https://api.github.com/repos/vim-jp/issues/labels/status/sent%20patch","name":"status/sent patch","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-18T03:04:19Z","updated_at":"2015-10-07T12:49:41Z","closed_at":null,"body":"最新(v7.4.873) のソースコード、Windows7、VisualStudio 2012 でのビルドで確認しました。\r\n\r\nタイトルの通り、 `DYNAMIC_PYTHON=yes` 、 `DYNAMIC_PYTHON3=no` の組み合わせでビルドエラーとなります。\r\n\r\n以下はビルドに使用したバッチファイル\r\n\r\n```BatchFile\r\n@setlocal\r\n@set BASEDIR=%CD%\r\n@set VS2012_64_VCVARS=\"c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\vcvarsall.bat\"\r\n@call %VS2012_64_VCVARS% amd64\r\n\r\ncd %BASEDIR%\\src\r\nnmake -f make_mvc.mak PYTHON=\"C:\\Python27\" PYTHON_VER=27 DYNAMIC_PYTHON=yes  PYTHON3=\"C:\\Python34\" PYTHON3_VER=34 DYNAMIC_PYTHON3=no\r\n```\r\n以下がエラーメッセージです。\r\n```\r\n        cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE       -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\\ObjCYHAMD64/ /Ox /GL -DNDEBUG  /Zl /MT -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON -DDYNAMIC_PYTHON  -DDYNAMIC_PYTHON_DLL=\\\"python27.dll\\\" -DFEAT_PYTHON3 -DFEAT_BIG /Fd.\\ObjCYHAMD64/ /Zi /I \"C:\\Python34\\Include\" /I \"C:\\Python34\\PC\" if_python3.c\r\nif_python3.c\r\nif_python3.c(835) : error C2065: 'hinstPy3' : undeclared identifier\r\nNMAKE : fatal error U1077: '\"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\BIN\\amd64\\cl.EXE\"' : return code '0x2'\r\nStop.\r\n```\r\n\r\n確認したところ、エラーになるのは件の組合せのみで、他の場合はビルドエラーになりません。\r\n\r\nDYNAMIC_PYTHON | DYNAMIC_PYTHON3 | 結果\r\n---------------------------|-----------------------------|-------\r\nyes | yes | OK\r\nyes | no | NG\r\nno | yes | OK\r\nno | no | OK\r\n\r\n\r\nおそらく、以下のようなパッチで修正できると思うのですが、なにぶんビルドスイッチの依存関係が追い切れないので、ご確認頂けないでしょうか？\r\n\r\n```diff\r\n--- a/src/if_python3.c\tFri Sep 18 11:11:13 2015 +0900\r\n+++ b/src/if_python3.c\tFri Sep 18 11:12:21 2015 +0900\r\n@@ -828,7 +828,7 @@\r\n     --recurse;\r\n }\r\n \r\n-#if (defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON)) || defined(PROTO)\r\n+#if (defined(DYNAMIC_PYTHON3) && defined(FEAT_PYTHON)) || defined(PROTO)\r\n     int\r\n python3_loaded()\r\n {\r\n```"},"comment":{"url":"https://api.github.com/repos/vim-jp/issues/issues/comments/146186854","html_url":"https://github.com/vim-jp/issues/issues/769#issuecomment-146186854","issue_url":"https://api.github.com/repos/vim-jp/issues/issues/769","id":146186854,"user":{"login":"h-east","id":518808,"avatar_url":"https://avatars.githubusercontent.com/u/518808?v=3","gravatar_id":"","url":"https://api.github.com/users/h-east","html_url":"https://github.com/h-east","followers_url":"https://api.github.com/users/h-east/followers","following_url":"https://api.github.com/users/h-east/following{/other_user}","gists_url":"https://api.github.com/users/h-east/gists{/gist_id}","starred_url":"https://api.github.com/users/h-east/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-east/subscriptions","organizations_url":"https://api.github.com/users/h-east/orgs","repos_url":"https://api.github.com/users/h-east/repos","events_url":"https://api.github.com/users/h-east/events{/privacy}","received_events_url":"https://api.github.com/users/h-east/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T12:49:41Z","updated_at":"2015-10-07T12:49:41Z","body":"https://groups.google.com/forum/#!topic/vim_dev/UnXHS4PmS0E\r\n\r\n@sgur フォローお願いします。"}}