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 -- Frank Heckenbach, f.heckenbach@fh-soft.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8