View previous topic :: View next topic |
Author |
Message |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sun Mar 20, 2011 7:08 pm Post subject: (LNK2019) Direct3D9 |
|
|
Hey.
I installed the Direct3D SDK Version (February 2005) and moved all the files from the /lib/ and /include/ to the Microsoft SDKs folder.
I included the library and the header files for Direct3D9, and i'm getting a linker error for Direct3DCreate9 Function.
Here is my code:
Code: |
#include <Windows.h>
#include <D3D9.h>
#pragma comment ( lib, "D3D9.lib" )
LPDIRECT3D9 D3D;
LPDIRECT3DDEVICE9 d3dDevice;
void initialize ( HWND hWnd )
{
D3D = Direct3DCreate9 ( D3D_SDK_VERSION );
D3DPRESENT_PARAMETERS d3dParameters;
ZeroMemory ( &d3dParameters, sizeof ( D3DPRESENT_PARAMETERS ) );
d3dParameters.Windowed = TRUE;
d3dParameters.hDeviceWindow = hWnd;
d3dParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
D3D->CreateDevice ( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dParameters, &d3dDevice );
}
|
Heres the error the compiler is outputting:
Code: |
1>MainCode.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "void __cdecl initialize(struct HWND__ *)" (?initialize@@YAXPAUHWND__@@@Z)
|
This is the only function i'm receiving a linker error for, other functions seem to work fine..?
Please help,
Thanks.
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Mar 20, 2011 7:50 pm Post subject: |
|
|
why would you download a dx sdk that is half a decade older than the latest release
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Mar 20, 2011 9:55 pm Post subject: Re: (LNK2019) Direct3D9 |
|
|
iPromise wrote: |
I installed the Direct3D SDK Version (February 2005) and moved all the files from the /lib/ and /include/ to the Microsoft SDKs folder.
|
You're doing it wrong.
1. Download the most recent versions if you don't need outdated ones.
2. Don't move files, learn how to include outside directories.
_________________
- Retired. |
|
Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sat Mar 26, 2011 2:17 pm Post subject: |
|
|
I downloaded this one because I need DirectPlay which has been depreciated and isn't stored in the latest SDK's.
Thanks for the suggestions Wicaan.
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Mar 26, 2011 4:47 pm Post subject: |
|
|
why would you ever need directplay
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Mar 27, 2011 6:13 am Post subject: |
|
|
Only reason I can assume you would need it is for a private server or client for an extremely dated game or poorly designed idea. If you are doing something with DirectPlay on your own, it was depreciated for a reason (its horrible). Look into other options if you don't have to use it.
_________________
- Retired. |
|
Back to top |
|
 |
|