Try this: echo EXPORTS > foo.def nm foo.dll | grep ' T _' | sed 's/.* T _//' >> foo.def - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".