Glenn Howes wrote:
I need to create a DLL which is loadable from a Visual Studio C++ application.
By analogy with the gcc command given in the MingW32 FAQ (http:// www.mingw.org/mingwfaq.shtml), I tried:
$ gpc -c --automake MySource.p -shared -o MySource.DLL -Wl, --ouput- def, MySource.def, --out-implib, MySource.a -lgpc
and the output is:
gpc.exe: --output-def: linker input file unused because linking not done gpc.exe: MySource.def: linker input file unused because linking not done gpc.exe: --out-implib: linker input file unused because linking not done gpc.exe: MySource.a: linker input file unused because linking not done
There must be no space after the commas after the "-Wl" options:
[...] -Wl,--output-def,MySource.def,--out-implib,MySource.a -lgpc
gpc.exe: -lgpc: linker input file unused because linking not done
The "-Wl" options are used only for linking, and "-c" tells GPC not to link. I don't know the full procedure (I don't use Windows), but perhaps just omit the "-c", or move the "-Wl" options to a later command (if there's one).
Frank