{"action":"closed","issue":{"url":"https://api.github.com/repos/p-org/P/issues/41","repository_url":"https://api.github.com/repos/p-org/P","labels_url":"https://api.github.com/repos/p-org/P/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/p-org/P/issues/41/comments","events_url":"https://api.github.com/repos/p-org/P/issues/41/events","html_url":"https://github.com/p-org/P/issues/41","id":140311934,"number":41,"title":"Generated header file should use #ifdef __cplusplus","user":{"login":"paulthomson","id":5478283,"avatar_url":"https://avatars.githubusercontent.com/u/5478283?v=3","gravatar_id":"","url":"https://api.github.com/users/paulthomson","html_url":"https://github.com/paulthomson","followers_url":"https://api.github.com/users/paulthomson/followers","following_url":"https://api.github.com/users/paulthomson/following{/other_user}","gists_url":"https://api.github.com/users/paulthomson/gists{/gist_id}","starred_url":"https://api.github.com/users/paulthomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulthomson/subscriptions","organizations_url":"https://api.github.com/users/paulthomson/orgs","repos_url":"https://api.github.com/users/paulthomson/repos","events_url":"https://api.github.com/users/paulthomson/events{/privacy}","received_events_url":"https://api.github.com/users/paulthomson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-11T22:49:24Z","updated_at":"2016-03-17T05:23:13Z","closed_at":"2016-03-17T05:23:13Z","body":"The header file generated by the P compiler should have `#ifdef __cplusplus` just like the runtime header files. Otherwise, from C++ code, you have to do:\r\n```c++\r\n// Must include these before including \"program.h\" otherwise you get errors for having nested extern \"C\" blocks\r\n#include \"PrtWinUser.h\"\r\n#include \"PrtExecution.h\"\r\n\r\n\r\nextern \"C\"\r\n{\r\n#include \"program.h\"\r\n}\r\n```"}}