gcc linkage problem with C & D

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu Jul 26 00:46:31 PDT 2007


Charles D Hixson wrote:
> a bust.  But this means that I'm going to need to pass into the linker 
> the output of `pkg-config --libs gtk+-2.0`, which doesn't appear to pass 
> correctly to dmd. (I can't even see any compiler options for accepting 
> it...you'd think that -L might work, but if it will I haven't out how to 
> cause it to.)

Two options:

1) Pass "-L$(DMD_DIR)/lib -lphobos -lpthread -lm" to gcc or ld when 
using either for linking (these are the libs D requires when compiled 
with dmd, IIRC).

2) Pass something like $(addprefix -L, $(shell pkg-config --libs 
gtk+-2.0)) to dmd when using it for linking. This will add '-L' in front 
of every library specification; the reason just adding -L didn't work 
was that your command adds multiple libraries.


More information about the Digitalmars-d-learn mailing list