{"action":"created","issue":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/345","repository_url":"https://api.github.com/repos/bytedeco/javacpp-presets","labels_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/345/comments","events_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/345/events","html_url":"https://github.com/bytedeco/javacpp-presets/issues/345","id":198084903,"node_id":"MDU6SXNzdWUxOTgwODQ5MDM=","number":345,"title":"Struct declared inside ifdef","user":{"login":"Sailsman63","id":4542515,"node_id":"MDQ6VXNlcjQ1NDI1MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/4542515?v=4","gravatar_id":"","url":"https://api.github.com/users/Sailsman63","html_url":"https://github.com/Sailsman63","followers_url":"https://api.github.com/users/Sailsman63/followers","following_url":"https://api.github.com/users/Sailsman63/following{/other_user}","gists_url":"https://api.github.com/users/Sailsman63/gists{/gist_id}","starred_url":"https://api.github.com/users/Sailsman63/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sailsman63/subscriptions","organizations_url":"https://api.github.com/users/Sailsman63/orgs","repos_url":"https://api.github.com/users/Sailsman63/repos","events_url":"https://api.github.com/users/Sailsman63/events{/privacy}","received_events_url":"https://api.github.com/users/Sailsman63/received_events","type":"User","site_admin":false},"labels":[{"id":93993119,"node_id":"MDU6TGFiZWw5Mzk5MzExOQ==","url":"https://api.github.com/repos/bytedeco/javacpp-presets/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":93993121,"node_id":"MDU6TGFiZWw5Mzk5MzEyMQ==","url":"https://api.github.com/repos/bytedeco/javacpp-presets/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-29T23:40:09Z","updated_at":"2018-06-20T04:08:57Z","closed_at":null,"author_association":"NONE","body":"Hi, I'm trying to wrap the [assimp](https://github.com/assimp/assimp) library using javacpp. I'm not very knowledegeble about C or C++ to begin with, and am running into trouble here: The header files in question export both a C and a C++ API for embedding in other applications, though the library itself is written in C++. \r\n\r\nSeveral structs are declared similar to so:\r\n\r\n```\r\nstruct aiPlane\r\n{\r\n#ifdef __cplusplus\r\n    aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {}\r\n    aiPlane (ai_real _a, ai_real _b, ai_real _c, ai_real _d)\r\n        : a(_a), b(_b), c(_c), d(_d) {}\r\n\r\n    aiPlane (const aiPlane& o) : a(o.a), b(o.b), c(o.c), d(o.d) {}\r\n\r\n#endif // !__cplusplus\r\n\r\n    //! Plane equation\r\n    ai_real a,b,c,d;\r\n} PACK_STRUCT; // !struct aiPlane\r\n```\r\nIn my case, I'm interested in the more flexible C++ api, declared in the `#ifdef ... endif` segments.\r\nThe generated java file shows:\r\n\r\n```\r\n//#ifdef __cplusplus\r\n\r\n//#endif // !__cplusplus\r\n    /* Plane equation*/\r\n    @Namespace(\"aiPlane\") @Name(\"PACK_STRUCT.a\") public static native @Cast(\"ai_real\") double PACK_STRUCT_a(); public static native void PACK_STRUCT_a(double PACK_STRUCT_a);\r\n//so-forth for each component.\r\n```\r\n\r\nI've tried a couple of different things, including using an info entry cppText to try to strip the `#ifdef` and `#endif` lines before parsing, but I can't get the parser to actually process the C++ version of the struct. Is there something simple that I'm missing here?"},"comment":{"url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/comments/398618234","html_url":"https://github.com/bytedeco/javacpp-presets/issues/345#issuecomment-398618234","issue_url":"https://api.github.com/repos/bytedeco/javacpp-presets/issues/345","id":398618234,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODYxODIzNA==","user":{"login":"Sailsman63","id":4542515,"node_id":"MDQ6VXNlcjQ1NDI1MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/4542515?v=4","gravatar_id":"","url":"https://api.github.com/users/Sailsman63","html_url":"https://github.com/Sailsman63","followers_url":"https://api.github.com/users/Sailsman63/followers","following_url":"https://api.github.com/users/Sailsman63/following{/other_user}","gists_url":"https://api.github.com/users/Sailsman63/gists{/gist_id}","starred_url":"https://api.github.com/users/Sailsman63/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sailsman63/subscriptions","organizations_url":"https://api.github.com/users/Sailsman63/orgs","repos_url":"https://api.github.com/users/Sailsman63/repos","events_url":"https://api.github.com/users/Sailsman63/events{/privacy}","received_events_url":"https://api.github.com/users/Sailsman63/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T04:08:57Z","updated_at":"2018-06-20T04:08:57Z","author_association":"NONE","body":"I'll have to re-try compiling - it's been a bit, and the assimp project has progressed quite a way since then."}}
{"actor":{"display_login":"Sailsman63"}}