I have project which involves both C and D code. For reasons that are much too long to explain, I have to use GCC to compile the C code into object files (GDC to compile the D code into object files) and then ld to link all the object files together. Now (unless I am missing something) ld cant link D object files (a whole bunch of errors about undefined references to a million different things) which I can only assume is attributed to ld not knowing about the D libraries and runtime. GDC can link D object files just fine, but again for reasons too long to explain, I cannot use GDC to link the object files together.

I need to take a handful of specific C files and a handful of Specific D files and link them together (and redirect it into another .o object file using the -r switch of ld) but again, ld can't deal with D object files. I have tried using the -Xlinker as well as -Wl switches from GDC to pass the -r switch to the linker, but GDC just spews out "/usr/bin/ld: cannot find -lgcc_s" and fails.

Sorry if I am making no sense, if I am not being clear, let me know and I will try to re-explain, hoping someone can help me.

Cheers.


Reply via email to