-
Compile problem
I have some trouble to compile my program using make and a Makefile.
It complains that the method ReadDirectoryChangesW is an undeclared identifier.
At the beginning, I have:
#include <winbase.h>
According to MSDN, the kernel32.lib should be imported as well.
How is a library imported? :~/
-
Re: Compile problem
Hi,
In your Project Settings go to the link tab and there in the object/library modules box add Kernel32.lib. Save the settings and rebuild your project.
Hope this helps.
Regards,
Smriti Venkatesh
-
Re: Compile problem
You usually don't want to include <winbase.h> directly -- instead, you want to include <windows.h>, which includes <winbase.h> after defining a number of things it needs to compile correctly.
To include kernel32.lib, you simply include that on your linker command-line, something like:
whatever.exe: whatever.obj
link whatever.obj kernel32.lib
.c.obj:
$(CC) -c $(CFLAGS) $<
The universe is a figment of its own imagination.