c++.windows.32-bits - winspool.lib
- Pete Reason (24/24) Dec 14 2002 I've only got the free dmc off the web site and it got me started and go...
- Daniel Fazekas (33/57) Dec 15 2002 The easiest way of generating the correct up-to-date .LIB files for DMC ...
- rado (34/101) Dec 17 2002 I don't think creating a def file for import library is so difficult, an...
I've only got the free dmc off the web site and it got me started and going to the wonderful world of the windows API. So Thanks! However, I would like to compile programs that print using the API (eg: OpenPrinter(), StartDocPrinter() and so on...). And I believe that I need the file "winspool.lib". But this file is not in the "lib" folder. How can I get this file? Do I need to create it? How? I did try using the program "lib" to make this file using the common file "WINSPOOL.DRV". But when I compile I get the errors: print.obj(print) Error 42: Symbol Undefined _ClosePrinter 4 print.obj(print) Error 42: Symbol Undefined _EndDocPrinter 4 print.obj(print) Error 42: Symbol Undefined _EndPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _WritePrinter 16 print.obj(print) Error 42: Symbol Undefined _StartPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _StartDocPrinterA 12 print.obj(print) Error 42: Symbol Undefined _OpenPrinterA 12 --- errorlevel 7 -S.
Dec 14 2002
The easiest way of generating the correct up-to-date .LIB files for DMC is the following: a) you need the Platform SDK from Microsoft http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm b) you need access to Visual Studio 6.0 (also known as 98), the bin folder of Visual C++ 6.0. You need lib.exe, link.exe and mspdb60.dll (the dll is not originally in the bin folder, but find it and copy it there; it's in some common shared files folder) Note that Visual Studio .NET (7.0) doesn't cut it, as it's LIB and LINK utility doesn't have the necessary functionality any more. :( c) you have to get dm812util.zip off the digitalmars site Now if you have all three, just take the necessary .LIB file from the platform sdk, and in a two step process: first run (from VC++ 6.0): LIB.EXE /CONVERT something.lib then run (from the dm util package, do NOT use the Borland utility of the same name!): COFF2OMF.EXE something.lib Then just copy the resulting file into DM's lib subfolder, and you should be golden. I converted the latest platform sdk to DM's format, it's only 3 MB zipped, but I suppose neither Digital Mars nor myself am able to legally redistribute it. We could talk privately though. ;) There are also some other ways of creating the correct libs, involving .DEF files and the IMPLIB utility, but that is far more troublesome. -- Daniel "Pete Reason" <return inburst.com> wrote in message news:athcfl$1c9t$1 digitaldaemon.com...I've only got the free dmc off the web site and it got me started andgoingto the wonderful world of the windows API. So Thanks! However, I would like to compile programs that print using the API (eg: OpenPrinter(), StartDocPrinter() and so on...). And I believe that I need the file "winspool.lib". But this file is not in the "lib" folder. HowcanI get this file? Do I need to create it? How? I did try using the program "lib" to make this file using the common file "WINSPOOL.DRV". But when I compile I get the errors: print.obj(print) Error 42: Symbol Undefined _ClosePrinter 4 print.obj(print) Error 42: Symbol Undefined _EndDocPrinter 4 print.obj(print) Error 42: Symbol Undefined _EndPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _WritePrinter 16 print.obj(print) Error 42: Symbol Undefined _StartPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _StartDocPrinterA 12 print.obj(print) Error 42: Symbol Undefined _OpenPrinterA 12 --- errorlevel 7 -S.
Dec 15 2002
I don't think creating a def file for import library is so difficult, and if you learn how to do it you will be able to create import lib for every dll you want. Basically all you need is to know which dll is exporting that function. Here are the steps needed to create one: 1. Compile your program 2. Create one blank def file and place in front of it: LIBRARY "WINSPOOL" ;here comes the name of the dll you are creating the lib for EXETYPE NT ; SUBSYSTEM WINDOWS,4.0 ;these are for creating 32bit import lib EXPORTS ; 3. Copy these Symbol Undefined errors and paste them in the def file 4. Now edit them so the name of export function to be equal to the name of function you are using: _ClosePrinter 4=ClosePrinter _EndDocPrinter 4=EndDocPrinter _EndPagePrinter 4=EndPagePrinter _WritePrinter 16=WritePrinter _StartPagePrinter 4=StartPagePrinter _StartDocPrinterA 12=StartDocPrinterA _OpenPrinterA 12=OpenPrinterA 5. This is it. Your def file is ready. Now create the import library: c:\> implib winspool.lib winspool.def 6. Your library is ready and you can link your program with it. Just keep your def file as later you may want to add more imports to the library. "Daniel Fazekas" <fds mailbox.hu> wrote in message news:ati63c$25b1$1 digitaldaemon.com...The easiest way of generating the correct up-to-date .LIB files for DMC is the following: a) you need the Platform SDK from Microsoft http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm b) you need access to Visual Studio 6.0 (also known as 98), the bin folder of Visual C++ 6.0. You need lib.exe, link.exe and mspdb60.dll (the dll is not originally inthebin folder, but find it and copy it there; it's in some common sharedfilesfolder) Note that Visual Studio .NET (7.0) doesn't cut it, as it's LIB and LINK utility doesn't have the necessary functionality any more. :( c) you have to get dm812util.zip off the digitalmars site Now if you have all three, just take the necessary .LIB file from the platform sdk, and in a two step process: first run (from VC++ 6.0): LIB.EXE /CONVERT something.lib then run (from the dm util package, do NOT use the Borland utility of the same name!): COFF2OMF.EXE something.lib Then just copy the resulting file into DM's lib subfolder, and you shouldbegolden. I converted the latest platform sdk to DM's format, it's only 3 MB zipped, but I suppose neither Digital Mars nor myself am able to legally redistribute it. We could talk privately though. ;) There are also some other ways of creating the correct libs, involving.DEFfiles and the IMPLIB utility, but that is far more troublesome. -- Daniel "Pete Reason" <return inburst.com> wrote in message news:athcfl$1c9t$1 digitaldaemon.com...needI've only got the free dmc off the web site and it got me started andgoingto the wonderful world of the windows API. So Thanks! However, I would like to compile programs that print using the API (eg: OpenPrinter(), StartDocPrinter() and so on...). And I believe that Ifilethe file "winspool.lib". But this file is not in the "lib" folder. HowcanI get this file? Do I need to create it? How? I did try using the program "lib" to make this file using the common"WINSPOOL.DRV". But when I compile I get the errors: print.obj(print) Error 42: Symbol Undefined _ClosePrinter 4 print.obj(print) Error 42: Symbol Undefined _EndDocPrinter 4 print.obj(print) Error 42: Symbol Undefined _EndPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _WritePrinter 16 print.obj(print) Error 42: Symbol Undefined _StartPagePrinter 4 print.obj(print) Error 42: Symbol Undefined _StartDocPrinterA 12 print.obj(print) Error 42: Symbol Undefined _OpenPrinterA 12 --- errorlevel 7 -S.
Dec 17 2002