|
From: Stefan B. <sb...@sb...> - 2005-10-31 23:15:52
|
Brian Dessent wrote: > B) The .exe uses LoadLibrary and GetProcAddress to load and access > the .dll (such as in the case of a plugin that can be dynamically > added/removed as necessary) and the .dll links directly against the > .exe without using GetProcAddress. This is just the converse of the > above, except that now creating the .exe does not depend on the .dll > existing at all. > gcc main.o -o main.exe -Wl,--out-implib,libmain.a > gcc -shared foo.o -o foo.dll -lmain Are you sure this works like you describe it? The man page of "ld" says that --out-implib only works when linking a DLL (i.e. -shared). And in fact, the version of gcc that I have here seems to agree: --out-implib is simply ignored when linking an executable. -- Stefan Bellon |