Re: Undefined references when linking to C library

2010-12-23 Thread Peter Federighi
wrzosk wrote: > I've had simmilar issue a few days ago. The problem is that global values > from C should be marked shared in D > extern int val; -> extern (C) shared int val; > or maybe __gshared. Both makes linking stage finishes with success. Jerome M. Berger wrote: > I think gpm_zerobased, _b

Re: Undefined references when linking to C library

2010-12-23 Thread wrzosk
On 23.12.2010 20:38, Peter Federighi wrote: Jonathan M Davis wrote: Did you wrap the C declarations in an extern(C) block? Without that, it's going to think that your variables are D variables not C variables. The same goes for any functions - _especially_ for the functions. In fact, a large por

Re: Undefined references when linking to C library

2010-12-23 Thread Jérôme M. Berger
Peter Federighi wrote: > Jonathan M Davis wrote: >> Did you wrap the C declarations in an extern(C) block? Without that, it's >> going >> to think that your variables are D variables not C variables. The same goes >> for >> any functions - _especially_ for the functions. In fact, a large portion

Re: Undefined references when linking to C library

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 11:38:28 Peter Federighi wrote: > Jonathan M Davis wrote: > > Did you wrap the C declarations in an extern(C) block? Without that, it's > > going to think that your variables are D variables not C variables. The > > same goes for any functions - _especially_ for the fun

Re: Undefined references when linking to C library

2010-12-23 Thread Peter Federighi
Jonathan M Davis wrote: > Did you wrap the C declarations in an extern(C) block? Without that, it's > going > to think that your variables are D variables not C variables. The same goes > for > any functions - _especially_ for the functions. In fact, a large portion of - > in > not all of - your

Re: Undefined references when linking to C library

2010-12-22 Thread Jonathan M Davis
On Wednesday 22 December 2010 19:25:35 Peter Federighi wrote: > Hello all. > > I'm writing a simple terminal game (that will eventually be turned into a > simple SDL game) and thought I would add mouse support via libgpm. So, I > converted gpm.h into gpm.d. Perhaps I didn't do this correctly bec

Undefined references when linking to C library

2010-12-22 Thread Peter Federighi
Hello all. I'm writing a simple terminal game (that will eventually be turned into a simple SDL game) and thought I would add mouse support via libgpm. So, I converted gpm.h into gpm.d. Perhaps I didn't do this correctly because I get several undefined references when trying to link. Here's an