www.digitalmars.com         C & C++   DMDScript  

D.gnu - Linking to static gtkd libraries

reply Ed McCardell <edmccard hotmail.com> writes:
I've built gtkD as a static library using gdc, but whenever I try to 
link libgtkd.a into another program, I get dozens of errors like

/path/to/libgtkd.a(HScrollbar.o)(.data+0x80)undefined reference to `____t.0'

I'm using the latest gdc from github, with the latest gcc snapshot, on 
both 32- and 64-bit linux.

Could this be related to https://bitbucket.org/goshawk/gdc/issue/284/ 
and if so, is there any way around it?

--Ed
Apr 23 2012
next sibling parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Mon, 23 Apr 2012 19:30:25 -0400
schrieb Ed McCardell <edmccard hotmail.com>:

 I've built gtkD as a static library using gdc, but whenever I try to 
 link libgtkd.a into another program, I get dozens of errors like
 
 /path/to/libgtkd.a(HScrollbar.o)(.data+0x80)undefined reference to `____t.0'
 
 I'm using the latest gdc from github, with the latest gcc snapshot, on 
 both 32- and 64-bit linux.
 
 Could this be related to https://bitbucket.org/goshawk/gdc/issue/284/ 
 and if so, is there any way around it?
 
 --Ed

I tend to post to that issue now and then. There are actually two issues in one. One has to do with LTO and errors in the form of ___t.2234.2342.23 and the other I get with any of the recent GDC sources is what you see: ____t.<some number> errors. The difference is in the amount of dot separated numbers. You can choose to use the revision that is given in that bug report. It works as long as you don't use LTO. ;) -- Marco
Apr 23 2012
parent Ed McCardell <edmccard hotmail.com> writes:
On 04/23/2012 08:02 PM, Marco Leise wrote:
 Am Mon, 23 Apr 2012 19:30:25 -0400
 schrieb Ed McCardell<edmccard hotmail.com>:

 I've built gtkD as a static library using gdc, but whenever I try to
 link libgtkd.a into another program, I get dozens of errors like

 /path/to/libgtkd.a(HScrollbar.o)(.data+0x80)undefined reference to `____t.0'

One has to do with LTO and errors in the form of ___t.2234.2342.23 and the other I get with any of the recent GDC sources is what you see: ____t.<some number> errors. The difference is in the amount of dot separated numbers. You can choose to use the revision that is given in that bug report. It works as long as you don't use LTO. ;)

Thanks, that's working for me. Now just cross my fingers and hope I don't run into any of the bugs fixed by later revisions ;) --Ed
Apr 24 2012
prev sibling parent "fazlehayat" <f.hayat95 yahoo.com> writes:
On Monday, 23 April 2012 at 23:30:31 UTC, Ed McCardell wrote:
 I've built gtkD as a static library using gdc, but whenever I 
 try to link libgtkd.a into another program, I get dozens of 
 errors like

 /path/to/libgtkd.a(HScrollbar.o)(.data+0x80)undefined reference 
 to `____t.0'

 I'm using the latest gdc from github, with the latest gcc 
 snapshot, on both 32- and 64-bit linux.

 Could this be related to 
 https://bitbucket.org/goshawk/gdc/issue/284/ and if so, is 
 there any way around it?

 --Ed

Apr 25 2012