From: óÅÒÇÅÊ ó. <se...@zo...> - 2003-09-03 14:56:03
|
Hello Mingw-users! Thanks, Luke. Now it's more or less clear(a kind of). It happens I read the Colin Peters's tutorial not carefully enough. The key phrase was "However, most DLLs export the function names in plain form (without the @)." And one more question. Does the above case hold for any STDCALL functions in the win32 api? Or is there some rule? LD> With the original stdcall declarations you need to use the "--kill-at" flag LD> to dlltool when building the import libraries (just removing the PASCAL will LD> make programs crash). By default, the name stored in the import table and LD> the symbol in the import library are the same apart from underscores (e.g. LD> "IcmpCreateFile@0") but when you add this flag it means that the name in the LD> .exe import table will be "IcmpCreateFile", while the symbol name remains LD> the same. This is necessary because the import library symbol has to match LD> what the compiler outputs and the import table must match the export table LD> of the DLL. If you look in the w32api source you'll see that the "-k" What do you mean under "w32api source"? LD> (--kill-at) flag is used there too. However, inet_addr is already present in LD> the current version of libwsock32.a so you shouldn't need to add it (just LD> use -lwsock32 when linking). -- Best regards, Sergey mailto:se...@zo... |