Reputation: 63
I have an error
error LNK2001: unresolved external symbol _CLSID_D2D1HueRotation
I can't understand why I get this error.
The error is on 4th line of the code CLSID_D2D1HueRotation
.
This is the code...
float width = 350;
float height = 100;
Microsoft::WRL::ComPtr<ID2D1Effect> hueRotationEffect;
context2->CreateEffect(CLSID_D2D1HueRotation, &hueRotationEffect);
hueRotationEffect->SetInput(0, tetronimoBitmap.Get());
hueRotationEffect->SetValue(D2D1_HUEROTATION_PROP_ANGLE, 270.0f);
rectImage = { width,height, width + tetronimoBitmap->GetSize().width, height + tetronimoBitmap->GetSize().height };
//context2->CreateBitmapBrush(tetronimoBitmap.Get(), tetronimoBitmapBrush.ReleaseAndGetAddressOf());
context2->DrawImage(hueRotationEffect.Get());
//context2->FillRectangle(rectImage, tetronimoBitmapBrush.Get());
//context2->DrawBitmap(tetronimoBitmap.Get(), &rectImage, 1.0f, D2D1_INTERPOLATION_MODE_LINEAR, NULL);
if (FAILED(context2->EndDraw())) {
context2->EndDraw();
}
Upvotes: 0
Views: 225
Reputation: 63
The solution is to link d2d1.lib, dxguid.lib
. Thanks kiran Biradar.
Upvotes: 1