?
Solved

unresolved external symbol - What am I doing wrong?

Posted on 2003-03-05
5
Medium Priority
?
2,140 Views
Last Modified: 2009-12-23
Clip.cpp
Linking...
   Creating library Debug/VOBPlayer.lib and object Debug/VOBPlayer.exp
Clip.obj : error LNK2001: unresolved external symbol _IID_IBasicAudio
Clip.obj : error LNK2001: unresolved external symbol _IID_IBasicVideo
Clip.obj : error LNK2001: unresolved external symbol _IID_IVideoWindow
Clip.obj : error LNK2001: unresolved external symbol _IID_IMediaPosition
Clip.obj : error LNK2001: unresolved external symbol _IID_IMediaSeeking
Clip.obj : error LNK2001: unresolved external symbol _IID_IMediaEventEx
Clip.obj : error LNK2001: unresolved external symbol _IID_IMediaControl
Clip.obj : error LNK2001: unresolved external symbol _CLSID_FilterGraph
Clip.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
Debug/VOBPlayer.dll : fatal error LNK1120: 9 unresolved externals


**********  What am I doing wrong?

header files:

#include "stdafx.h"
#include <dshow.h>
#include "VOBPlayer.h"
#include "Clip.h"
0
Comment
Question by:Evaus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:n_fortynine
ID: 8077805
Make sure your project settings are correct. These usually happen when you are using afx but not specifying so.
0
 

Expert Comment

by:IngvarWolf
ID: 8078066
According to names in error messages you use some interfaces (COM technology). Interface is an abstract class i.e. class containig pure virtual functions. May be you are trying to create an object of some class which has no realization of some of such functions? I think you should check in that direction.

If this possible - what declarations do you have in VOBPlayer.h, Clip.h and stdafx.h?
0
 

Expert Comment

by:gotenks
ID: 8078090
my guess is you need to define those symbol. i have faced this type of problem before, but for my case, i forget to define my function implementation. for example :

/* main.cpp */

/* function declaration */
void foo();

int main() {
   foo();
   return 0;
}

/* end of main.cpp */

the syntax is fine but when the compiler wish to link, it cannot find the actual implementation of the function foo(), so i get the unresolved external symbol for foo() error. after i added the code for foo(), it is fine.
0
 

Accepted Solution

by:
icehands earned 400 total points
ID: 8078258
Are you linking with strmiids.lib?  According to MSDN all DirectShow applications have to link with strmiids.lib (included with the DirectX SDK).


Strmiids.lib:

Exports class identifiers (CLSIDs) and interface identifiers (IIDs). All DirectShow applications require this library.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/buildingdirectshowapplications.asp

When I remove this library from my projects I get the same linker errors.
0
 
LVL 1

Expert Comment

by:helmet275
ID: 8078346
unresolved external symbols come from not link your project correctly.  in your project settings make sure these library are linked with your project:

winmm.lib , msvcrt.lib, strmiids.lib

for more info on use the DirectX SDK help and look up DirectShow FAQ.  this list exactly what files need to be linked based on what type of build you are making.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question