-1

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.

Or Betzalel
  • 2,427
  • 11
  • 47
  • 70
  • And the error message is? – NetVipeC Aug 08 '14 at 17:04
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – πάντα ῥεῖ Aug 08 '14 at 17:05
  • As I said in the title : Unresolved External Symbol. A very common error in C++ to my understanding – Or Betzalel Aug 08 '14 at 17:30

1 Answers1

-2

The solution that some external libraries's .libs require being added through the linker in the project properties.

Or Betzalel
  • 2,427
  • 11
  • 47
  • 70