Skip to main content
Ctrl+K

jiangsheng's docs

  • Homepage
  • Games
  • Blogs
  • Grandma's handbook
  • Homepage
  • Games
  • Blogs
  • Grandma's handbook

Section Navigation

  • 内容:

    • 2026
    • 2025
    • 2024
    • 2023
    • 2022
    • 2021
    • 2020
    • 2019
    • 2018
    • 2017
    • 2016
    • 2015
    • 2013
    • 2012
    • 2011
      • Blogs in January 2011
      • Blogs in February 2011
      • Blogs in March 2011
      • Blogs in April 2011
        • Bug in Security Update for Visual C++ Redistributable Package: April 12, 2011 causes program error on Windows 2000
        • How to solve LNK2001 errors related to Windows SDK CLSIDs
      • Blogs in June 2011
      • Blogs in July 2011
      • Blogs in September 2011
    • 2010
    • 2009
    • 2008
    • 2007
    • 2006
    • 2005
    • 2004
    • 2003
    • 2002
    • 2001

Indices

  • General Index
  • Blogs
  • Blogs in 2011
  • Blogs in April 2011
  • How to solve LNK2001 errors related to Windows SDK CLSIDs

How to solve LNK2001 errors related to Windows SDK CLSIDs#

User IMFCoder wants to know how to solve a LNK2001 error related to CLSID_CMpeg4sDecMediaObject. The user has no problem linking a lib file in the project but couldn’t find which lib the CLSID is in.

The Windows SDK is strangely cryptic on which lib file the CLSID is exported from. Luckily you can find out the library file you need to link with, if you execute the following command line in the SDK command prompt.

Update: use

findstr /m /S /c:"CMpeg4" \*.lib

is easier.

C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\Lib>for %a in (\*.lib) do dumpbin /symbols %a \|find "CMpeg4"

After a bunch of fruitless searches, the search yields the results when it encounters wmcodecdspuuid.lib

C:Program FilesMicrosoft SDKsWindowsv7.0Lib>dumpbin /symbols wmcodecdspuuid.lib | find “CMpeg4” 056 00000000 SECT1D notype External | _CLSID_CMpeg4DecMediaObject 059 00000000 SECT1E notype External | _CLSID_CMpeg43DecMediaObject 05C 00000000 SECT1F notype External | _CLSID_CMpeg4sDecMediaObject 05F 00000000 SECT20 notype External | _CLSID_CMpeg4sDecMFT 065 00000000 SECT22 notype External | _CLSID_CMpeg4EncMediaObject 068 00000000 SECT23 notype External | _CLSID_CMpeg4sEncMediaObject

There is a big uuid.lib file contains most of the SDK CLSIDs in the Windows SDK, and it is likely linked by default if you use Visual C++’s project templates, so you may not see the link error at all if you use common CLSIDs like CLSID_InternetExplorer.

There are also GUIDs defined in the Windows SDK using the DEFINE_GUID macro. The SDK assumes you to initialize the GUID using the methods demonstrated in How to avoid error “LNK2001 unresolved external” by using DEFINE_GUID.

More ADO issues with KB983246/Windows 7 SP1: a reference count leaking when event is used   Bug in Security Update for Visual C++ Redistributable Package: April 12, 2011 causes program error on Windows 2000

previous

Bug in Security Update for Visual C++ Redistributable Package: April 12, 2011 causes program error on Windows 2000

next

Blogs in June 2011

Edit on GitHub

This Page

  • Show Source

Social Media Links

  • twitter (archived): #jiangsheng
  • bluesky: sheng-jiang.bsky.social
  • stackoverflow: Sheng Jiang 蒋晟

© Copyright 2018-, Sheng Jiang.

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.17.1.