Click to See Complete Forum and Search --> : Compile problem


Johan M
May 20th, 1999, 04:29 AM
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? :~/

Smriti
May 25th, 1999, 01:36 AM
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

Jerry Coffin
May 25th, 1999, 04:19 PM
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.