{"action":"created","issue":{"url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/410","labels_url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/410/comments","events_url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/410/events","html_url":"https://github.com/ochafik/nativelibs4java/issues/410","id":15098761,"number":410,"title":"Java code not generated if ifdef condition into enum exists","user":{"login":"dzavodnikov","id":1470950,"avatar_url":"https://avatars.githubusercontent.com/u/1470950?v=3","gravatar_id":"","url":"https://api.github.com/users/dzavodnikov","html_url":"https://github.com/dzavodnikov","followers_url":"https://api.github.com/users/dzavodnikov/followers","following_url":"https://api.github.com/users/dzavodnikov/following{/other_user}","gists_url":"https://api.github.com/users/dzavodnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/dzavodnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzavodnikov/subscriptions","organizations_url":"https://api.github.com/users/dzavodnikov/orgs","repos_url":"https://api.github.com/users/dzavodnikov/repos","events_url":"https://api.github.com/users/dzavodnikov/events{/privacy}","received_events_url":"https://api.github.com/users/dzavodnikov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ochafik/nativelibs4java/labels/JNAerator","name":"JNAerator","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-06-04T02:01:23Z","updated_at":"2015-03-18T09:50:19Z","closed_at":null,"body":"For example, I have 2 header files: *header2_1.h* and *header2_2.h*.\r\n\r\nFile *header2_1.h* contains:\r\n\r\n    #define VERSION  1\r\n    \r\n    #ifndef PARAM\r\n    #define PARAM (VERSION < 2)\r\n    #endif\r\n    \r\n    int f1();\r\n    \r\n    enum DAY {\r\n        sunday,\r\n        monday,\r\n        tuesday,\r\n        wednesday,\r\n        thursday,\r\n    #if PARAM\r\n    #include \"header2_2.h\"\r\n    #endif\r\n    };\r\n    \r\n    int f2();\r\n\r\nFile *header2_2.h* contains:\r\n\r\n    friday,\r\n    saturday\r\n\r\nAnd I use this code to generate wrapper:\r\n\r\n    $ java -jar jnaerator-0.12-SNAPSHOT-20130323-2.jar  -dontCastConstants \\\r\n    -f -limitComments -mode 'Directory' -preferJavac -runtime JNA \\\r\n    -skipLibraryInstance -I include -library test header2_1.h\r\n\r\nResult is:\r\n\r\n    ...\r\n    public interface TestLibrary extends Library {\r\n        public static final boolean PARAM = (1 < 2);\r\n        public static final int VERSION = 1;\r\n        /// Original signature : <code>int f1()</code>\r\n        int f1();\r\n    }\r\n\r\n**No enumeration definition** and **no function definitions AFTER enumeration**!\r\n\r\nIf I comment *#include \"header2_2.h\"* everything works fine."},"comment":{"url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/comments/82856664","html_url":"https://github.com/ochafik/nativelibs4java/issues/410#issuecomment-82856664","issue_url":"https://api.github.com/repos/ochafik/nativelibs4java/issues/410","id":82856664,"user":{"login":"ochafik","id":273860,"avatar_url":"https://avatars.githubusercontent.com/u/273860?v=3","gravatar_id":"","url":"https://api.github.com/users/ochafik","html_url":"https://github.com/ochafik","followers_url":"https://api.github.com/users/ochafik/followers","following_url":"https://api.github.com/users/ochafik/following{/other_user}","gists_url":"https://api.github.com/users/ochafik/gists{/gist_id}","starred_url":"https://api.github.com/users/ochafik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ochafik/subscriptions","organizations_url":"https://api.github.com/users/ochafik/orgs","repos_url":"https://api.github.com/users/ochafik/repos","events_url":"https://api.github.com/users/ochafik/events{/privacy}","received_events_url":"https://api.github.com/users/ochafik/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T09:50:19Z","updated_at":"2015-03-18T09:50:19Z","body":"This issue was moved to ochafik/JNAerator#45"}}