{"action":"created","issue":{"url":"https://api.github.com/repos/ldc-developers/ldc/issues/216","repository_url":"https://api.github.com/repos/ldc-developers/ldc","labels_url":"https://api.github.com/repos/ldc-developers/ldc/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/ldc-developers/ldc/issues/216/comments","events_url":"https://api.github.com/repos/ldc-developers/ldc/issues/216/events","html_url":"https://github.com/ldc-developers/ldc/issues/216","id":7849870,"number":216,"title":"TypeInfo/.init emission and separate compilation","user":{"login":"ariovistus","id":842452,"avatar_url":"https://avatars.githubusercontent.com/u/842452?v=3","gravatar_id":"","url":"https://api.github.com/users/ariovistus","html_url":"https://github.com/ariovistus","followers_url":"https://api.github.com/users/ariovistus/followers","following_url":"https://api.github.com/users/ariovistus/following{/other_user}","gists_url":"https://api.github.com/users/ariovistus/gists{/gist_id}","starred_url":"https://api.github.com/users/ariovistus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariovistus/subscriptions","organizations_url":"https://api.github.com/users/ariovistus/orgs","repos_url":"https://api.github.com/users/ariovistus/repos","events_url":"https://api.github.com/users/ariovistus/events{/privacy}","received_events_url":"https://api.github.com/users/ariovistus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2012-10-25T06:10:19Z","updated_at":"2016-11-04T19:35:50Z","closed_at":null,"body":"In the following example, I try to use a module with a struct in it, but not build an object file for the module. This would be ideal for deimos headers. However, link complains. dmd compiles the example just fine. Linux 64, dmd and ldc hot off github.\n\nIs this a thing that could be improved?\n\ntest.d:\n\n``` d\nimport core.vararg;\nimport cc;\n\nvoid main () {\n    A a;\n    void boo(...){\n    }\n    boo(a);\n}\n```\n\nThe vararg is what triggers the link error.\n\ncc.d:\n\n``` d\nextern(C):\n    struct A {\n        int i;\n        int j;\n        int k;\n    }\n```\n\ndmd test\n(works)\n\nldc2 test.d\n\ntest.o:(.rodata._D15TypeInfo_S2cc1A6__initZ[_D15TypeInfo_S2cc1A6__initZ]+0x28): undefined reference to `_D2cc1A6__initZ'\ncollect2: ld returned 1 exit status\nError: /usr/bin/gcc failed with status: 1\n"},"comment":{"url":"https://api.github.com/repos/ldc-developers/ldc/issues/comments/258527685","html_url":"https://github.com/ldc-developers/ldc/issues/216#issuecomment-258527685","issue_url":"https://api.github.com/repos/ldc-developers/ldc/issues/216","id":258527685,"user":{"login":"kinke","id":1889215,"avatar_url":"https://avatars.githubusercontent.com/u/1889215?v=3","gravatar_id":"","url":"https://api.github.com/users/kinke","html_url":"https://github.com/kinke","followers_url":"https://api.github.com/users/kinke/followers","following_url":"https://api.github.com/users/kinke/following{/other_user}","gists_url":"https://api.github.com/users/kinke/gists{/gist_id}","starred_url":"https://api.github.com/users/kinke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinke/subscriptions","organizations_url":"https://api.github.com/users/kinke/orgs","repos_url":"https://api.github.com/users/kinke/repos","events_url":"https://api.github.com/users/kinke/events{/privacy}","received_events_url":"https://api.github.com/users/kinke/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T19:35:49Z","updated_at":"2016-11-04T19:35:49Z","body":"If using a `float` field in `cc.A`, there are more linking issues (`xtoHash`, `xopEquals`)."}}
{"actor":{"display_login":"kinke"}}