错误LNK2019:未解析的外部符号adobe Flash源引擎

时间:2017-01-13 10:58:32

标签: c++ visual-studio linker

Iam在源引擎中进行了修改,并尝试将adobe Flash添加到其中 我已经在visual studio 2010中包含了来自Microsoft DirectX SDK(2010年6月)的头文件和库,但在编译项目时它给了我错误

1>FlashManager.obj : error LNK2019: unresolved external symbol _D3DXCreateSprite@8 referenced in function "public: bool __thiscall FlashManager::RecreateTargets(struct IDirect3DDevice9 *)" (?RecreateTargets@FlashManager@@QAE_NPAUIDirect3DDevice9@@@Z)
1>FlashManager.obj : error LNK2019: unresolved external symbol _D3DXMatrixTransformation2D@28 referenced in function "public: void __thiscall FlashManager::SceneDataHook(void)" (?SceneDataHook@FlashManager@@QAEXXZ)
1>FlashManager.obj : error LNK2019: unresolved external symbol "struct IFlashDX * __cdecl GetFlashToDirectXInstance(void)" (?GetFlashToDirectXInstance@@YAPAUIFlashDX@@XZ) referenced in function "public: __thiscall FlashManager::FlashManager(void)" (??0FlashManager@@QAE@XZ)
1>.\Release_sdk\Client.dll : fatal error LNK1120: 3 unresolved externals

我该如何解决? 链接每件事

代码

bool FlashManager::RecreateTargets(IDirect3DDevice9* pD3DDevice)
{
    HRESULT hr;

    int movieIndex = GetPlayingMovieIndex();
    int newWidth = -1, newHeight = -1;

    if (movieIndex > -1)
    {
        newWidth = m_movieArray[movieIndex].GetWidth();
        newHeight = m_movieArray[movieIndex].GetHeight();
    }
    else
    {
        newWidth = w;
        newHeight = h;
    }

    hr = pD3DDevice->CreateTexture(newWidth, newHeight, 1, 0, transparency_mode ? D3DFMT_A8R8G8B8 : D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &g_Texture, NULL);
    if (FAILED(hr))
        return false;

    D3DXCreateSprite(pD3DDevice, &Sprite); //the problem
    g_pD3DDevice = pD3DDevice;

    if (m_flashPlayer)
        m_flashPlayer->ResizePlayer(newWidth, newHeight);

    for (int i = 0; i < num_textures_in_rotation; ++i)
    {
        hr = pD3DDevice->CreateTexture(newWidth, newHeight, 1, 0,
            transparency_mode ? D3DFMT_A8R8G8B8 : D3DFMT_X8R8G8B8, D3DPOOL_SYSTEMMEM, &g_texturesRotation[i], NULL);

        if (FAILED(hr))
            return false;
    }

    recreatedTargets = true;

    return true;
}

链接错误2

        D3DXMatrixTransformation2D(&Mat, NULL, 0, &Scaling, NULL, 0, &Translation);   // The problem

最后一个链接错误

FlashManager::FlashManager()
{
    engine->GetScreenSize(w, h);

    // Flash init
    m_flashDX = GetFlashToDirectXInstance();   //the problem
    m_flashPlayer = m_flashDX->CreatePlayer(w, h);

    if (!m_flashPlayer)
    {
        MessageBox(NULL, "Flash Player failed to initialize.", "Error", MB_OK);
        abort();
    }

    m_playerASI = new ASInterface(m_flashPlayer);

0 个答案:

没有答案