{"action":"created","issue":{"url":"https://api.github.com/repos/cloudcompare/trunk/issues/235","labels_url":"https://api.github.com/repos/cloudcompare/trunk/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/cloudcompare/trunk/issues/235/comments","events_url":"https://api.github.com/repos/cloudcompare/trunk/issues/235/events","html_url":"https://github.com/cloudcompare/trunk/pull/235","id":112115645,"number":235,"title":"Fix loading the QFACETS plugin when compiled with gcc","user":{"login":"ao2","id":1249395,"avatar_url":"https://avatars.githubusercontent.com/u/1249395?v=3","gravatar_id":"","url":"https://api.github.com/users/ao2","html_url":"https://github.com/ao2","followers_url":"https://api.github.com/users/ao2/followers","following_url":"https://api.github.com/users/ao2/following{/other_user}","gists_url":"https://api.github.com/users/ao2/gists{/gist_id}","starred_url":"https://api.github.com/users/ao2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ao2/subscriptions","organizations_url":"https://api.github.com/users/ao2/orgs","repos_url":"https://api.github.com/users/ao2/repos","events_url":"https://api.github.com/users/ao2/events{/privacy}","received_events_url":"https://api.github.com/users/ao2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-19T10:18:02Z","updated_at":"2015-10-19T13:22:44Z","closed_at":"2015-10-19T13:21:48Z","pull_request":{"url":"https://api.github.com/repos/cloudcompare/trunk/pulls/235","html_url":"https://github.com/cloudcompare/trunk/pull/235","diff_url":"https://github.com/cloudcompare/trunk/pull/235.diff","patch_url":"https://github.com/cloudcompare/trunk/pull/235.patch"},"body":"The QFACETS plugin cannot be loaded when compiled with gcc because of\r\na missing symbol:\r\n\r\n[11:48:20] [Plugin] Cannot load library .../plugins/libQFACETS_PLUGIN_DLL.so:\r\n  (.../plugins/libQFACETS_PLUGIN_DLL.so: undefined symbol: _ZN12ccColorScale9MAX_STEPSE)\r\n\r\nThe error seems to be about plugins/qFacets/stereogramDlg.cpp using the\r\nsymbol ccColorScale::MAX_STEPS as a parameter of a template function\r\nwhile the symbol is not properly exported.\r\n\r\nApparently gcc is quite strict about static integer members being\r\n_declared_ in the class declaration but then not explicitly _defined_ in\r\nthe implementation.\r\n\r\nSome references:\r\nhttp://stackoverflow.com/questions/3025997/defining-static-const-integer-members-in-class-definition\r\nhttps://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition\r\nhttps://isocpp.org/wiki/faq/ctors#link-errs-static-data-mems\r\n\r\nThis is the minimal fix to have the plugin loaded successfully, but for\r\nconsistency other static member in the class definition may have to be\r\ndefined as well, or even made private if they do not need to be exposed."},"comment":{"url":"https://api.github.com/repos/cloudcompare/trunk/issues/comments/149211785","html_url":"https://github.com/cloudcompare/trunk/pull/235#issuecomment-149211785","issue_url":"https://api.github.com/repos/cloudcompare/trunk/issues/235","id":149211785,"user":{"login":"cloudcompare","id":2735509,"avatar_url":"https://avatars.githubusercontent.com/u/2735509?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudcompare","html_url":"https://github.com/cloudcompare","followers_url":"https://api.github.com/users/cloudcompare/followers","following_url":"https://api.github.com/users/cloudcompare/following{/other_user}","gists_url":"https://api.github.com/users/cloudcompare/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudcompare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudcompare/subscriptions","organizations_url":"https://api.github.com/users/cloudcompare/orgs","repos_url":"https://api.github.com/users/cloudcompare/repos","events_url":"https://api.github.com/users/cloudcompare/events{/privacy}","received_events_url":"https://api.github.com/users/cloudcompare/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T13:22:44Z","updated_at":"2015-10-19T13:22:44Z","body":"Ah! I can't count the number of times it has already happened... I really don't get why gcc is so strict about this. Thanks anyway."}}