I made a dll for DirectX tools and got stuck with a compilation error (As the title says : Unresolved External Symbol Direct3DCreate9 called from initDevice) when creating the device.
I narrowed down the code to a single line and a single function and the error persists.
#include "stdafx.h"
#include "DirectXTools.h"
#include <stdexcept>
#include <d3d9.h> 
using namespace std;
namespace DirectX
{
    LPDIRECT3D9 directX;
    void initDevice(HWND myWindow) {
        directX = Direct3DCreate9(D3D_SDK_VERSION);
    }
}
I am a beginner C++ programmer so I assume the problem is very easy to solve.
