Jump to content

  • Log In with Google      Sign In   
  • Create Account


rotation and translation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 26 May 2012 - 03:42 PM

I am attempting to translate and rotate a wireframe cube in dx9 and c++.I have done research on matrices and toymaker's site and some gamedev's old postings.I am able to get vs 2010 to compile my code but I get a link2019 error. Here is my error, I am pretty sure I have linked all the proper headers and libraries.
>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixTranslation@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>C:\Users\phil\Desktop\bgp_sources\vcnet2003\VCNET2003\chapter06\load_bitmap\triangledx9\Debug\triangledx9.exe : fatal error LNK1120: 3 unresolved externals
here is the code I am having trouble with.
float x=10.0f,y=10.0f,z=5.0f,r=D3DX_PI/2.0;
void SetupMatrices()
{
D3DXMATRIX matWorld;
D3DXMATRIX matTemp;
D3DXMatrixTranslation( &matWorld, x, y, z );
D3DXMatrixRotationY( &matTemp, r );
D3DXMatrixMultiply( &matWorld, &matWorld, &matTemp );
D3DXMatrixTranslation( &matTemp, x, y, z );
D3DXMatrixMultiply( &matWorld, &matWorld, &matTemp );
d3ddev->SetTransform( D3DTS_WORLD, &matWorld );
}
I will continue to work on this problem.

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9392

Like
0Likes
Like

Posted 26 May 2012 - 03:47 PM

Did you add d3dx9.lib to your linker inputs?

#3 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 26 May 2012 - 03:55 PM

yes I did

#4 frob   Moderators   -  Reputation: 18883

Like
0Likes
Like

Posted 26 May 2012 - 10:16 PM

The error message implies that you did not correctly add it.

The error message is that the linker is looking for functions, but cannot find them. The functions are in d3dx9.lib.
Check out my personal indie blog at bryanwagstaff.com.

#5 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 27 May 2012 - 11:51 AM

thanks for all the help,I did get the problem resolved.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS