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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. unresolved externals when instantiating COM objects

unresolved externals when instantiating COM objects

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++comgraphicsgame-dev
1 Posts 1 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.
  • I Offline
    I Offline
    imposterrific
    wrote on last edited by
    #1

    I am using VisualC++ to write a multimedia program using COM. I get link errors when I compile my program stating that CLSID_FilterGraph and IID_IGraphBuilder are unresolved externals. Here is the code they appear in: hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void**)&pBuilder); The code is straighforward and the CLSID_FilterGraph can even be found using search in the file uuids.h. When I include it the link errors remain. I made sure to include DirectX headers and libraries in the link paths for VisualC++. Here is a list of all of the headers and defines I have included: #define _WIN32_DCOM #include #include #include #include #define WIN32_LEAN_AND_MEAN #include #include #include #include #ifndef GetWindowLongPtr #define GetWindowLongPtrA GetWindowLongA #define GetWindowLongPtrW GetWindowLongW #ifdef UNICODE #define GetWindowLongPtr GetWindowLongPtrW #else #define GetWindowLongPtr GetWindowLongPtrA #endif // !UNICODE #endif // !GetWindowLongPtr #ifndef SetWindowLongPtr #define SetWindowLongPtrA SetWindowLongA #define SetWindowLongPtrW SetWindowLongW #ifdef UNICODE #define SetWindowLongPtr SetWindowLongPtrW #else #define SetWindowLongPtr SetWindowLongPtrA #endif // !UNICODE #endif // !SetWindowLongPtr #ifndef GWLP_USERDATA #define GWLP_USERDATA (-21) #endif I realize that some of these defines and included are irrelavent. I copied everything from the example files (which worked) in the way of headers and I thought I should show you what I had tried. I've been staring at this problem for a day now and any help would be greatly appreciated. Thanks Jeff

    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