Media Foundation unresolved external symbol

Hello. I am trying to create an application which captures video input, uses the differences between the frames of the video stream to construct a virtual representation of the world, and then finds a path through the world to a certain destination. Now, I realize that this is a large project, typically taken on my large teams, and that I do not possess adequate resources to properly do this. However, please let me indulge myself.

The problem I have is, oddly enough, with code I copy-pasted from the Windows website. I decided to use the Windows Media Foundation (on Windows 7 64-bit) to manage the video input device. After digging around on MSDN for a while, I came across the page at http://msdn.microsoft.com/en-us/library/dd317912(v=vs.85).aspx. I chose the first function given because it seemed to be the easiest to deal with. However, when I try to compile my project, I get a linker error about the functions "MFEnumDeviceSources" and "MFCreateAttributes" (lines 25 and 11 respectively on the MSDN page). It's error LNK2019, unresolved external symbols. I've included every header file starting with "mf" that I could, as you can see from the below code. Does anyone know what the problem has come from?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//include statements in stdafx.h
#include <stdlib.h>
#include <string>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <vector>
#include <Windows.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <mferror.h>
#include <mfmp2dlna.h>
#include <mfobjects.h>
#include <mfplay.h>
#include <mftransform.h>
#include <gl/gl.h>
#include <gl/GLU.h>
#include <iostream>
#include <fstream> 


My main source file is too big to be in this post, so I uploaded it to https://skydrive.live.com/redir?resid=266D8B652DED80ED!46286&authkey=!ACd0K6WOKuleW4Q
Last edited on
Last edited on
That works wonderfully, thanks! I assumed that those were automatically linked, for some reason.
Topic archived. No new replies allowed.