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

Thread: PathIsDirectory

  1. #1
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    440

    Question PathIsDirectory

    I'm trying to use PathIsDirectory in a unicode build but always get
    Code:
    error LNK2001: unresolved external symbol __imp__PathIsDirectoryW@4
    I've included shlwapi.h and link to shlwapi.lib .

    Can anyone please help me out with this ?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: PathIsDirectory

    Are you sure about shlwapi.lib? You seem to not have had added it to the build you were compiling
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    440

    Re: PathIsDirectory

    My workspace has an app and dll project. I've included shlwapi.h in the dll stdafx.h and linked shlwapi.lib in the dll project settings.

    The call to PathIsDirectory is at application level. Does this explain the linking error ?

  4. #4
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: PathIsDirectory

    use #pragma comment (lib, "shlwapi.lib") at the top of your application source, ie: linking lib with the app.
    ◄◄ hypheni ►►

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: PathIsDirectory

    Quote Originally Posted by zvenny View Post
    My workspace has an app and dll project. I've included shlwapi.h in the dll stdafx.h and linked shlwapi.lib in the dll project settings.

    The call to PathIsDirectory is at application level. Does this explain the linking error ?
    Yes.
    Victor Nijegorodov

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