Linking D DLL to C
BCS
BCS at pathlink.com
Tue May 23 16:23:50 PDT 2006
Kirk McDonald wrote:
[...]
>
> This does not work. I am using MinGW 3.4.2. The following command works:
>
> C:>gcc -c test2.c
>
> test2.o is generated without issue. However:
>
> C:>gcc -L. -lmydll test2.o
> ./mydll.dll: file not recognized: File format not recognized
> collect2: ld returned 1 exit status
>
> The linker fails. Again, I'm pretty sure I'm missing something obvious.
> Any help?
>
> -Kirk McDonald
First of all I'd try the using dmc/optlink instead of gcc. I haven't
tried this but dmd on win does have some issues with object/lib file
compatibility (at least with VS).
More information about the Digitalmars-d
mailing list