Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


(LNK2019) Direct3D9

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Mar 20, 2011 7:08 pm    Post subject: (LNK2019) Direct3D9 Reply with quote

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
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Mar 20, 2011 7:50 pm    Post subject: Reply with quote

why would you download a dx sdk that is half a decade older than the latest release
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Mar 20, 2011 9:55 pm    Post subject: Re: (LNK2019) Direct3D9 Reply with quote

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
View user's profile Send private message Visit poster's website
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sat Mar 26, 2011 2:17 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Mar 26, 2011 4:47 pm    Post subject: Reply with quote

why would you ever need directplay
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Mar 27, 2011 6:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites