{"action":"closed","issue":{"url":"https://api.github.com/repos/markfinal/BuildAMation/issues/197","repository_url":"https://api.github.com/repos/markfinal/BuildAMation","labels_url":"https://api.github.com/repos/markfinal/BuildAMation/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/markfinal/BuildAMation/issues/197/comments","events_url":"https://api.github.com/repos/markfinal/BuildAMation/issues/197/events","html_url":"https://github.com/markfinal/BuildAMation/issues/197","id":145152266,"number":197,"title":"Link a static library into a dynamic library","user":{"login":"markfinal","id":984489,"avatar_url":"https://avatars.githubusercontent.com/u/984489?v=3","gravatar_id":"","url":"https://api.github.com/users/markfinal","html_url":"https://github.com/markfinal","followers_url":"https://api.github.com/users/markfinal/followers","following_url":"https://api.github.com/users/markfinal/following{/other_user}","gists_url":"https://api.github.com/users/markfinal/gists{/gist_id}","starred_url":"https://api.github.com/users/markfinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfinal/subscriptions","organizations_url":"https://api.github.com/users/markfinal/orgs","repos_url":"https://api.github.com/users/markfinal/repos","events_url":"https://api.github.com/users/markfinal/events{/privacy}","received_events_url":"https://api.github.com/users/markfinal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/markfinal/BuildAMation/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"markfinal","id":984489,"avatar_url":"https://avatars.githubusercontent.com/u/984489?v=3","gravatar_id":"","url":"https://api.github.com/users/markfinal","html_url":"https://github.com/markfinal","followers_url":"https://api.github.com/users/markfinal/followers","following_url":"https://api.github.com/users/markfinal/following{/other_user}","gists_url":"https://api.github.com/users/markfinal/gists{/gist_id}","starred_url":"https://api.github.com/users/markfinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfinal/subscriptions","organizations_url":"https://api.github.com/users/markfinal/orgs","repos_url":"https://api.github.com/users/markfinal/repos","events_url":"https://api.github.com/users/markfinal/events{/privacy}","received_events_url":"https://api.github.com/users/markfinal/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/markfinal/BuildAMation/milestones/4","html_url":"https://github.com/markfinal/BuildAMation/milestones/v1.0.2","labels_url":"https://api.github.com/repos/markfinal/BuildAMation/milestones/4/labels","id":1641954,"number":4,"title":"v1.0.2","description":"Bug fixes in the 1.0.2 release family.","creator":{"login":"markfinal","id":984489,"avatar_url":"https://avatars.githubusercontent.com/u/984489?v=3","gravatar_id":"","url":"https://api.github.com/users/markfinal","html_url":"https://github.com/markfinal","followers_url":"https://api.github.com/users/markfinal/followers","following_url":"https://api.github.com/users/markfinal/following{/other_user}","gists_url":"https://api.github.com/users/markfinal/gists{/gist_id}","starred_url":"https://api.github.com/users/markfinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfinal/subscriptions","organizations_url":"https://api.github.com/users/markfinal/orgs","repos_url":"https://api.github.com/users/markfinal/repos","events_url":"https://api.github.com/users/markfinal/events{/privacy}","received_events_url":"https://api.github.com/users/markfinal/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":5,"state":"open","created_at":"2016-03-14T07:02:35Z","updated_at":"2016-04-09T16:28:39Z","due_on":"2016-06-29T23:00:00Z","closed_at":null},"comments":3,"created_at":"2016-04-01T11:15:02Z","updated_at":"2016-04-09T16:28:39Z","closed_at":"2016-04-09T16:28:39Z","body":"Suppose you have a static library S which you wish to include symbols from into a dynamic library D.\r\n\r\nOn Windows, as long as the declspecs were set up in S, this works.\r\n\r\nOn Gcc, even when built with -fPIC, this fails in a future link step to find some symbols from S. This is due to how the linker resolves symbols from the static library at link step.\r\n\r\nhttp://stackoverflow.com/questions/2649735/how-to-link-static-library-into-dynamic-library-in-gcc\r\n\r\nI have confirmed that this definitely works\r\n\r\ng++ -Wl,--whole-archive some_static_lib.a -Wl,--no-whole-archive\r\n"}}