?
Solved

Unresolved External Symbol...

Posted on 2000-03-07
3
Medium Priority
?
3,655 Views
Last Modified: 2008-03-17
Hi...I got the following errors while linking......
:::::

Linking...
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::~CMediaType(void)" (??1CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::CMediaType(void)" (??0CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryVendorInfo(unsigned short * *)" (?QueryVendorInfo@CBaseFilter@@UAGJPAPAG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::JoinFilterGraph(struct IFilterGraph *,unsigned short const *)" (?JoinFilterGraph@CBaseFilter@@UAGJPAUIFilterGraph@@PBG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryFilterInfo(struct _FilterInfo *)" (?QueryFilterInfo@CBaseFilter@@UAGJPAU_FilterInfo@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::FindPin(unsigned short const *,struct IPin * *)" (?FindPin@CBaseFilter@@UAGJPBGPAPAUIPin@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::EnumPins(struct IEnumPins * *)" (?EnumPins@CBaseFilter@@UAGJPAPAUIEnumPins@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetSyncSource(struct IReferenceClock * *)" (?GetSyncSource@CBaseFilter@@UAGJPAPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::SetSyncSource(struct IReferenceClock *)" (?SetSyncSource@CBaseFilter@@UAGJPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetState(unsigned long,enum _FilterState *)" (?GetState@CBaseFilter@@UAGJKPAW4_FilterState@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Run(__int64)" (?Run@CBaseFilter@@UAGJ_J@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Pause(void)" (?Pause@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Stop(void)" (?Stop@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetClassID(struct _GUID *)" (?GetClassID@CBaseFilter@@UAGJPAU_GUID@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual class CBasePin * __thiscall CAsyncReader::GetPin(int)" (?GetPin@CAsyncReader@@UAEPAVCBasePin@@H@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CAsyncReader::GetPinCount(void)" (?GetPinCount@CAsyncReader@@UAEHXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::GetPinVersion(void)" (?GetPinVersion@CBaseFilter@@UAEJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::StreamTime(class CRefTime &)" (?StreamTime@CBaseFilter@@UAEJAAVCRefTime@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingRelease(void)" (?NonDelegatingRelease@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingAddRef(void)" (?NonDelegatingAddRef@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::NonDelegatingQueryInterface(struct _GUID const &,void * *)" (?NonDelegatingQueryInterface@CBaseFilter@@UAGJABU_GUID@@PAPAX@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CAsyncReader::~CAsyncReader(void)" (??1CAsyncReader@@UAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: class CMediaType & __thiscall CMediaType::operator=(class CMediaType const &)" (??4CMediaType@@QAEAAV0@ABV0@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CAsyncReader::CAsyncReader(char *,struct IUnknown *,class CAsyncStream *,long *)" (??0CAsyncReader@@QAE@PADPAUIUnknown@@PAVCAsyncStream@@PAJ@Z)
Debug/Harm1.exe : fatal error LNK1120: 25 unresolved externals

hmmmm...i think that the .lib files have problem because i didn't know which one have to be added.

I really hope that you can give me some ideas and solutions in order for me to build up my programs...

Really thanks you.....
Best regards
0
Comment
Question by:jaskin
[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
  • 2
3 Comments
 
LVL 8

Expert Comment

by:gelbert
ID: 2592929
There are two possible cases
1. You forget to add .lib files to make file and that why it complains
2. You did not export your classes
0
 

Accepted Solution

by:
sinclairj earned 20 total points
ID: 2594887
1) if this is your own dll/lib then the classes are probably not exported.


2) if this is not your dll/lib then there are at least two possibilities that come to mind.

- you have not included the lib on your linker line.

- the dll does not handle the
#pragma comment (lib, "") itself and you will have to do it yourself.
0
 
LVL 8

Expert Comment

by:gelbert
ID: 2600839
sinclairj, that is exactly what I said before you. :)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

649 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