I am trying to add support for cairo in a C++ .NET Direct Show filter I previously developed for prototyping some video processing functionality. The goal is to use cairo to add a text overlay to the video. I am having a tough time trying to get the filter building with cairo. I am using a static library of cairo (tried using a DLL but ran into other .NET issues so I am trying to keep things simple for now) which I was able to build from source. Seems the linker can't resolve any of the cairo function names.<br>
<br>
YUV Decoder error LNK2019: unresolved external symbol <A href="mailto:_cairo_create@4">_cairo_create@4</A> referenced in function "public: __thiscall CGraphicsRenderer::CGraphicsRenderer(enum _cairo_format,int,int)" (<A href="mailto:??0CGraphicsRenderer@@QAE@W4_cairo_format@@HH@Z">??0CGraphicsRenderer@@QAE@W4_cairo_format@@HH@Z</A>)<br>
YUV Decoder error LNK2019: unresolved external symbol <A href="mailto:_cairo_image_surface_create@12">_cairo_image_surface_create@12</A> referenced in function "public: __thiscall CGraphicsRenderer::CGraphicsRenderer(enum _cairo_format,int,int)" (<A href="mailto:??0CGraphicsRenderer@@QAE@W4_cairo_format@@HH@Z">??0CGraphicsRenderer@@QAE@W4_cairo_format@@HH@Z</A>)<br>
YUV Decoder error LNK2019: unresolved external symbol <A href="mailto:_cairo_surface_destroy@4">_cairo_surface_destroy@4</A> referenced in function "public: __thiscall CGraphicsRenderer::~CGraphicsRenderer(void)" (<A href="mailto:??1CGraphicsRenderer@@QAE@XZ">??1CGraphicsRenderer@@QAE@XZ</A>)<br>
<br>
So far the code is quite simple . . . <br>
<br>
<<<br>
<FONT color=#0000ff size=1><FONT color=#0000ff size=1>
<div>#include</FONT><FONT size=1><FONT color=#000000> "cairo-win32.h"</FONT></div>
<div></FONT><br>
class</FONT><FONT size=1> CGraphicsRenderer</div>
<div>{</div>
</FONT><FONT color=#0000ff size=1>
<div>public</FONT><FONT size=1>:</div>
<div>CGraphicsRenderer(cairo_format_t format, </FONT><FONT color=#0000ff size=1>int</FONT><FONT size=1> width, </FONT><FONT color=#0000ff size=1>int</FONT><FONT size=1> height)</div>
<div>{</div>
<div>m_pSurface = cairo_image_surface_create (format, width, height);</div>
<div>m_pCairo = cairo_create (m_pSurface);</div>
<div>};</div>
<div>~CGraphicsRenderer()</div>
<div>{</div>
<div></FONT><FONT color=#0000ff size=1>if</FONT><FONT size=1> (m_pCairo)</div>
<div>{</div>
<div>cairo_surface_destroy (m_pSurface);</div>
<div>}</div>
<div>};</div>
<div>cairo_surface_t *getSurface () </FONT><FONT color=#0000ff size=1>const</FONT><FONT size=1> { </FONT><FONT color=#0000ff size=1>return</FONT><FONT size=1> m_pSurface; };</div>
</FONT><FONT color=#0000ff size=1>
<div>private</FONT><FONT size=1>:</div>
<div>cairo_surface_t * m_pSurface;</div>
<div>cairo_t *m_pCairo;</div>
<div>};<br>
<FONT size=2>>><br>
<br>
Any help is appreciated.</FONT></div>
<div><FONT size=2></FONT> </div>
<div><FONT size=2>Thanks,</FONT></div>
<div><FONT size=2>Bob</FONT></div>
</FONT><div class="AOLPromoFooter">
<hr style="margin-top:10px;" />
Email and AIM finally together. You've gotta check out free <a href="http://o.aolcdn.com/cdn.webmail.aol.com/mailtour/aol/en-us/index.htm?ncid=AOLAOF00020000000970" target="_blank">AOL Mail</a>!<br/>
</div>