{"action":"created","issue":{"url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/17","repository_url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example","labels_url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/17/comments","events_url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/17/events","html_url":"https://github.com/sureshjoshi/android-ndk-swig-example/issues/17","id":391315436,"node_id":"MDU6SXNzdWUzOTEzMTU0MzY=","number":17,"title":"Can find reference from external share library","user":{"login":"cavarzan","id":3915288,"node_id":"MDQ6VXNlcjM5MTUyODg=","avatar_url":"https://avatars2.githubusercontent.com/u/3915288?v=4","gravatar_id":"","url":"https://api.github.com/users/cavarzan","html_url":"https://github.com/cavarzan","followers_url":"https://api.github.com/users/cavarzan/followers","following_url":"https://api.github.com/users/cavarzan/following{/other_user}","gists_url":"https://api.github.com/users/cavarzan/gists{/gist_id}","starred_url":"https://api.github.com/users/cavarzan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavarzan/subscriptions","organizations_url":"https://api.github.com/users/cavarzan/orgs","repos_url":"https://api.github.com/users/cavarzan/repos","events_url":"https://api.github.com/users/cavarzan/events{/privacy}","received_events_url":"https://api.github.com/users/cavarzan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-12-14T23:43:59Z","updated_at":"2018-12-21T21:30:59Z","closed_at":null,"author_association":"NONE","body":"I'm trying to use a external `.so` library to generate the Wrappers.\r\n\r\nAfter include the header `.h` file in the `SeePlusPlus.i` file, SWIG generate the classes but the build fails with errors:\r\n\r\n```\r\nandroid-ndk-swig-example/AS3/app/src/main/java/com/sureshjoshi/core/SeePlusPlusJAVA_wrap.cxx:7604: error: undefined reference to 'MapController::GetGridTotalColumns() const'\r\n\r\n```\r\n\r\nand at MapController:\r\n\r\n```\r\nclass MapController\r\n{\r\n  public:\r\n    MapController(void);\r\n    ~MapController(void);\r\n    ...\r\n     static bool IsBridge(const line_t *p_line);\r\n     uint16_t GetGridTotalColumns() const;\r\n     ...\r\n}\r\n```\r\n\r\nIt seems that SWIG doesn't find the class reference. \r\n\r\nmy `SeePlusPlus.i` file:\r\n\r\n```\r\n/* File : SeePlusPlus.i */\r\n%module SeePlusPlus_Wrapper\r\n\r\n/* Anything in the following section is added verbatim to the .cxx wrapper file */ \r\n%{\r\n#include \"GisCalculation.h\"\r\n#include \"map_structs.h\"\r\n#include \"MapController.h\"\r\n%}\r\n\r\n/* This will allow us to iterate through arrays defined by STL containers */\r\n%include \"std_string.i\"\r\n%include \"std_vector.i\"\r\n\r\n/* Create a template for std::vector< std::string > and std::vector< int > in Java */\r\nnamespace std {\r\n   %template(IntVector) vector<int>;\r\n   %template(StringVector) vector<string>;\r\n}\r\n\r\n/* This is the list of headers to be wrapped */\r\n/* For Java, it seems we need the file of interest and all files up the inheritance tree */\r\n%include \"map_structs.h\"\r\n%include \"GisCalculation.h\"\r\n%include \"MapController.h\"\r\n```"},"comment":{"url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/comments/449503290","html_url":"https://github.com/sureshjoshi/android-ndk-swig-example/issues/17#issuecomment-449503290","issue_url":"https://api.github.com/repos/sureshjoshi/android-ndk-swig-example/issues/17","id":449503290,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTUwMzI5MA==","user":{"login":"sureshjoshi","id":3823045,"node_id":"MDQ6VXNlcjM4MjMwNDU=","avatar_url":"https://avatars1.githubusercontent.com/u/3823045?v=4","gravatar_id":"","url":"https://api.github.com/users/sureshjoshi","html_url":"https://github.com/sureshjoshi","followers_url":"https://api.github.com/users/sureshjoshi/followers","following_url":"https://api.github.com/users/sureshjoshi/following{/other_user}","gists_url":"https://api.github.com/users/sureshjoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshjoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshjoshi/subscriptions","organizations_url":"https://api.github.com/users/sureshjoshi/orgs","repos_url":"https://api.github.com/users/sureshjoshi/repos","events_url":"https://api.github.com/users/sureshjoshi/events{/privacy}","received_events_url":"https://api.github.com/users/sureshjoshi/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T21:30:59Z","updated_at":"2018-12-21T21:30:59Z","author_association":"OWNER","body":"@gmribas That code was already there though, no?\r\n![screen shot 2018-12-21 at 16 30 11](https://user-images.githubusercontent.com/3823045/50364379-bf2c3480-053d-11e9-816a-ce9409f12329.png)\r\n"}}
{"actor":{"display_login":"sureshjoshi"}}