When compiling some DirectShow examples on the internet, you will always encounter various problems. The following is a collection:

Source: Internet
Author: User
Appear to still be having problems with linking errors, I 've managed to narrow it down to a few lines of code which cause the problem

Following the pushsource filter sample within the Platform SDK:

// DirectShow uplodes

# Include

<Streams. h>

# Include

<Initguid. h>

# Include

<Qedit. h> // For isamplegrabber

# Include

<Dvdmedia. h>

{8b578d13-87b2-488f-a4c1-ac8d065590d3}
Define_guid (clsid_mypushsource, 0x8b578d13, 0x87b2, 0x488f, 0xa4, 0xc1, 0xac, 0x8d, 0x6, 0x55, 0x90, 0xd3 );

Class mypushsource: Public csource
{
Public:
Mypushsource (iunknown * punk, hresult * phr );
};

Mypushsource: mypushsource (iunknown * punk, hresult * phr)
: Csource (name ("mypushsource"), punk, clsid_mypushsource)
{
// Do nothing yet
}

This code causes the following linking errors:

1> dracloud. OBJ: Error lnk2001: unresolved external symbol "public: Virtual long _ stdcall csource: findpin (unsigned short const *, struct ipin **)"(? Findpin @ csource @ uagjpbgpapauipin @ Z)
1> dracloud. OBJ: Error lnk2001: unresolved external symbol "public: Virtual long _ stdcall cbasefilter: joinfiltergraph (struct ifiltergraph *, unsigned short const *)"(? Joinfiltergraph @ cbasefilter @ uagjpauifiltergraph @ PBG @ Z)
1> dracloud. OBJ: Error lnk2001: unresolved external symbol "public: Virtual long _ stdcall cbasefilter: queryvendorinfo (unsigned short **)"(? Queryvendorinfo @ cbasefilter @ uagjpapag @ Z)

The libraries which are supported in my solution are:

Strmbase. Lib strmiids. Lib quartz. Lib winmm. Lib vfw32.lib odbc32.lib odbccp32.lib atls. Lib comsupp. Lib

I feel I must have missed something, or have the newest DirectX SDK, and platform SDK not got anything about the csource any more, its really confusing me.

======================== Solution =

Look out for "treat wchar_t as built in type" option on the C/C ++ language tab. if you 've been using an older version of strmbas * built from the base classes, you can have said "no" to this option. change it back to "yes ".

Some Link errors can be corrected as follows:
Open C/C ++> language> treat wchar_t as built-in type to yes.
Runtime Library ----> multi-threaded debug (/MTD)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.