Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Linking problems

Linking problems

Scheduled Pinned Locked Moved C / C++ / MFC
helpdebuggingquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Henrik
    wrote on last edited by
    #1

    Hello, I got a small linking problem, I get this error: TabCtrlEx.obj : error LNK2001: unresolved external symbol __imp__PathCompactPathA@12 Debug/FileOpus2.exe : fatal error LNK1120: 1 unresolved externals I try to use ::PathCompactPath(...); I do include the "shlwapi.h" file in my project, but still doesn't want to work. Any tips? Cheers, Henrik

    M 1 Reply Last reply
    0
    • H Henrik

      Hello, I got a small linking problem, I get this error: TabCtrlEx.obj : error LNK2001: unresolved external symbol __imp__PathCompactPathA@12 Debug/FileOpus2.exe : fatal error LNK1120: 1 unresolved externals I try to use ::PathCompactPath(...); I do include the "shlwapi.h" file in my project, but still doesn't want to work. Any tips? Cheers, Henrik

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      You need to link with shlwapi.lib too, so the linker knows which DLL contains the PathCompactPath() function. On the Link tab of your project settings, add shlwapi.lib. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

      M 1 Reply Last reply
      0
      • M Michael Dunn

        You need to link with shlwapi.lib too, so the linker knows which DLL contains the PathCompactPath() function. On the Link tab of your project settings, add shlwapi.lib. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

        M Offline
        M Offline
        Masaaki Onishi
        wrote on last edited by
        #3

        Hello, the codegurus around the world.;) The other way is to add the followings.

        #include shlwapi.h
        #pragma comment( lib, "shlwapi" )

        Have a nice day! -Masaaki Onishi-

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups