NO

Author Topic: PathCchAddBackslash: which lib?  (Read 2271 times)

Offline iwrbc

  • Member
  • *
  • Posts: 16
PathCchAddBackslash: which lib?
« on: August 16, 2020, 09:16:38 PM »
Hi, I am new to Pelles C, therefore I post it here. In my first Pelles C program, I use PathCchAddBackslash. This function is declared in pathcch.h so I included that file. According to the documentation at MSDN, the function is included in Pathcch.lib. When I add this lib to the linker options (library and object files), the file can not be found during the linking process. In fact, there is no such lib in Pelles C program dir. There is a file pathcch.lib elsewhere on my PC.  Can I just copy this lib and use it? Or should I use a different solution?
Any help is appreciated.

Offline algernon_77

  • Member
  • *
  • Posts: 33
Re: PathCchAddBackslash: which lib?
« Reply #1 on: August 16, 2020, 10:37:23 PM »
Hi!
I searched a bit and it seems PathCchAddBackslash is exported from api-ms-win-core-path-l1-1-0.dll
This, as I recall, is found in Win8 or newer. If this is the case, you may try to feed the patchcch.lib that you have to the linker (copy it to Pelle lib folder and add it to project->project options->linker->library and object files).

If there's no issue, you may use PathAddBackslash (the older, less safe version) which is in shlwapi.lib (this one is already in the Pelle lib folder).

Regards!

Offline iwrbc

  • Member
  • *
  • Posts: 16
Re: PathCchAddBackslash: which lib?
« Reply #2 on: August 17, 2020, 07:43:02 PM »
Thanks, it now works. Just a warning when compiling the debug version, but it does what I want.