The following very small program compiled with MinGW ran fine on Win95 but said "Error while loading DLL 'winspool.dll'" when running on NT4. I was able to solve the problem with these dubious commands:
cd \winnt\system32
copy winspool.drv winspool.dll
(There was no winspool.dll file before this.)
But, it's not OK to ask our customers to mess around with files in the system folder. I notice that libunicows.a contains "winspool.dll"; should it be "winspool.drv", or is some other change needed to the library?
I make this on a Win95 machine using MinGW. Then I move "text.exe" to the NT machine, and run it. It does the "Hello" dialog, then gives the same error message: "Error while loading DLL 'winspool.dll'".
Thanks in advance for any help.
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I re-built libunicows.a from the source, after editing unicows_import.c, only changing "winspool.dll" to "winspool.drv". This does seem to have solved the problem.
It seems that either name, .dll or .drv, works on Win95, but only .drv works on NT; the actual file is named .drv on both operating systems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
The following very small program compiled with MinGW ran fine on Win95 but said "Error while loading DLL 'winspool.dll'" when running on NT4. I was able to solve the problem with these dubious commands:
cd \winnt\system32
copy winspool.drv winspool.dll
(There was no winspool.dll file before this.)
But, it's not OK to ask our customers to mess around with files in the system folder. I notice that libunicows.a contains "winspool.dll"; should it be "winspool.drv", or is some other change needed to the library?
(begin file "test.c")
#include <windows.h>
#include <winspool.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
DWORD needed, returned;
MessageBox (NULL, TEXT ("Hello!"), TEXT ("test"), 0) ;
EnumPrinters(PRINTER_ENUM_LOCAL, NULL, 4, NULL, 0, &needed, &returned);
MessageBox (NULL, TEXT ("Goodbye!"), TEXT ("test"), 0) ;
return 0 ;
}
(end file "test.c")
(begin "makefile")
CC = gcc
CFLAGS = -DUNICODE=1 -s -O6 -mwindows -Wall -Wshadow -g
CLIBS = -L.. -lunicows -lwinmm -lwinspool
OBJS = test.o
test.exe: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(CLIBS)
(end "makefile")
I make this on a Win95 machine using MinGW. Then I move "text.exe" to the NT machine, and run it. It does the "Hello" dialog, then gives the same error message: "Error while loading DLL 'winspool.dll'".
Thanks in advance for any help.
Tom
I re-built libunicows.a from the source, after editing unicows_import.c, only changing "winspool.dll" to "winspool.drv". This does seem to have solved the problem.
It seems that either name, .dll or .drv, works on Win95, but only .drv works on NT; the actual file is named .drv on both operating systems.
Thanks a lot! Fixed now.