本文介绍了C ++ Builder中仅Direct2D部分链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++ Builder(Rad Studio Berlin)项目设置来使用Direct2d.画布绘制与TDirect2DCanvas配合得很好,这表明Direct2D正确链接.一切都呈现流畅.但是,我需要使用矩阵.尝试链接时出现链接错误.例如,当我尝试:

I've got a C++ Builder (Rad Studio Berlin) project setup to use Direct2d. Canvas drawing works just fine with the TDirect2DCanvas which would indicate Direct2D is linking properly. Everything renders smoothly. However, I need to use a matrix. I get linking error when I try to. For example, when try I:

canvas->RenderTarget->SetTransform(D2D1::Matrix3x2F::Rotation(15.0, D2D1PointF(100, 100)));

...我收到以下链接错误:

...I get the following linking error:

[ilink32 Error] Error: Unresolved external 'D2D1MakeRotateMatrix' referenced from C:\DP\TRUNK\SRC\CLIENTSIDE\APPLICATIONS\VIEWER\WIN32\DEBUG\MIMAGE.OBJ

如果我仅包含标头,则应该已经设置了

C ++构建器以针对Direct2d进行链接.谁能帮助我以C ++ Builder的方式链接到适当的文件?

C++ builder was supposed to already be setup to link against direct2d if I just include the headers. Can anyone help me link against the appropriate files in the C++ Builder way?

推荐答案

我从其他来源找到了解决方案.在这里:

I found the solution from a different source. Here it is:

经过研究,尚未确定此问题是错误.

After some research, this issue has not been determined to be a bug.

解决方案是(如上所述)将D2D1.lib添加到项目中,或在代码中静态引用它:

The solution is to either (as I mentioned previously) add the D2D1.lib to the project, or statically reference it in code:

// as long as D2D1.lib is on the library search path, it should be found
#pragma comment(lib,"D2D1.lib")

希望这可以澄清问题,

这篇关于C ++ Builder中仅Direct2D部分链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-13 04:52