lnk2019 with PathAppend and PathCombine

I hate to ask another "LNK2019" question, but this one has me stumped. As you may expect from the subject, I'm getting an LNK2019 error with PathAppend and PathCombine. Here is the error output (I removed the parameters from the function calls because they are extremely long and, I suspect, useless information):

1>WindowsMounter.obj : error LNK2019: unresolved external symbol __imp__PathCombineA@12 referenced in function "public: virtual void __thiscall uruz::WindowsMounter::run(...)
1>WindowsMounter.obj : error LNK2019: unresolved external symbol __imp__PathAppendA@8 referenced in function "public: virtual void __thiscall uruz::WindowsMounter::run(...)
1>C:\Uruz\UruzEngine\Test\Utility.exe : fatal error LNK1120: 2 unresolved externals

Naturally, the first thing I checked was to make sure that I had the Platform SDK's Lib directory added to my VC++ Library Directories list, which I do. Then I checked to ensure that the necessary file, shlwapi.lib, was actually there, and it is. Then I tried to think of something else that might cause LNK2019 on function calls from an imported library, and I couldn't. Finally, I came here. Any help would be appreciated.



Answer this question

lnk2019 with PathAppend and PathCombine

  • TurboTom

    "This files does not belong to the Shell32!"

    Ah! My mistake. That worked great, thanks for the help.

  • Leon Mayne

    Are you sure that shlwapi is included into you linker settings

    This files does not belong to the Shell32! You need to include the Shell light weight api lib into your project: shlwapi.lib.

    I usually place

    #pragma comment(lib, "Shlwapi.lib")

    in my code where i need it.



  • lnk2019 with PathAppend and PathCombine