Silverfrost Forums

Welcome to our forums

Winspool.lib (porting woe #5)

23 Nov 2005 6:34 #459

OK, the port finally compiles and now I'm resolving linker problems.

I'm using few APIs from Winspool.lib (OpenPrinterA, ClosePrinter, DocumentPropertiesA) but I can't find the way to make the linker happy. Winspool.lib is import library for (AFAIK) Winspool.drv. I'm building Win32 dll from VS.NET environment, and on adding

-addobj:Winspool.lib

Linker complains that it cannot find 'Winspool.lib'. OTOH, If I add:

-addobj:'C:\Program files...\Winspool.lib'

it complains about

*** Corrupt coff object: WINSPOOL.DRV

I'm having similar issues with Ole32.lib (CoInitialize, CoTaskMemFree). /IMPORT_LIB compiler switch doesn't help either.

-- Jugoslav

25 Nov 2005 12:14 #465

Jugoslav

From memory, you will need header information for compiling (as in win32api.ins etc). /IMPORT_LIB is not relevant. No special compiler switches are required.

When linking, try presenting the the name of the DLL (nothing before it) on the SLINK command line. In a script or interactive mode just use lo <DLLname>.

If this doesn't work then let me know. Alternatively the SLINK documentation is very comprehensive.

Please login to reply.