Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

unresolved external symbol - What am I doing wrong?

Posted on 2003-03-05
5
Medium Priority
?
2,200 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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

578 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