CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Compile problem

  1. #1
    Join Date
    May 1999
    Location
    L.A.
    Posts
    20

    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? :~/




  2. #2
    Join Date
    Apr 1999
    Posts
    9

    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

  3. #3
    Join Date
    May 1999
    Posts
    123

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured