From 680dacb164657a98d63b94f1bbded49f3cb3cf5f Mon Sep 17 00:00:00 2001 From: Joshua Daniel Franklin Date: Mon, 29 Mar 2004 06:37:40 +0000 Subject: [PATCH] 2004-03-28 Joshua Daniel Franklin * how-programming.texinfo: Make list in .lib FAQ enumerative. --- winsup/doc/ChangeLog | 4 ++++ winsup/doc/how-programming.texinfo | 26 +++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index 6c314af36..35482c6fc 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,7 @@ +2004-03-28 Joshua Daniel Franklin + + * how-programming.texinfo: Make list in .lib FAQ enumerative. + 2004-03-28 Joshua Daniel Franklin * how-programming.texinfo: Add note about gcc .lib linking. diff --git a/winsup/doc/how-programming.texinfo b/winsup/doc/how-programming.texinfo index 27cf9f969..de3286335 100644 --- a/winsup/doc/how-programming.texinfo +++ b/winsup/doc/how-programming.texinfo @@ -208,23 +208,27 @@ If your @samp{.lib} file is a normal static or import library with C-callable entry points, you can list @samp{foo.lib} as an object file for gcc/g++, just like any @samp{*.o} file. Otherwise, here are some steps: -1. Build a C file with a function table. Put all functions you intend +@enumerate +@item Build a C file with a function table. Put all functions you intend to use in that table. This forces the linker to include all the object files from the .lib. Maybe there is an option to force LINK.EXE to include an object file. -2. Build a dummy 'LibMain'. -3. Build a .def with all the exports you need. -4. Link with your .lib using link.exe. +@item Build a dummy 'LibMain'. +@item Build a .def with all the exports you need. +@item Link with your .lib using link.exe. +@end enumerate or -1. Extract all the object files from the .lib using LIB.EXE. -2. Build a dummy C file referencing all the functions you need, either -with a direct call or through an initialized function pointer. -3. Build a dummy LibMain. -4. Link all the objects with this file+LibMain. -5. Write a .def. -6. Link. +@enumerate +@item Extract all the object files from the .lib using LIB.EXE. +@item Build a dummy C file referencing all the functions you need, either + withth a direct call or through an initialized function pointer. +@item Build a dummy LibMain. +@item Link all the objects with this file+LibMain. +@item Write a .def. +@item Link. +@end enumerate You can use these methods to use MSVC (and many other runtime libs) with Cygwin development tools.