Sign in to follow this  

Problem using D3DXVec3Normalize etc. in console applications

This topic is 2843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm pretty new to DX in general, and would like to get familiar with the vector manipulation parts of DX before I start setting up scenes with camera and the whole shabang. So, I've started writing a console app which does some basic calculations using D3DXVECTOR3 and similar structures. Feeling pretty lazy, I'd like to use some of the DX functions acting on such 3-vectors, but then the code won't compile (LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function "some_function_I_wrote_which_is_calling_normalize_but_used_to_work_just_fine") Now, I've checked the lib/inc-folders in VC, and they check out fine. Even more, I'm amble to use D3DXVECTOR3s, so I feel a little lost. Anyone got some clues for me? Thanks! Btw: how do you write plus in this board?

Share this post


Link to post
Share on other sites
Thanks Mike, it works now. I had already set Project->Properties->Configuration Properties->Linker->General->Addtional Library Directories to "C:\Program Files\Microsoft DirectX SDK (August 2009)\Lib\x86". Didn't realize I had to explicitly add the .lib-file (I added it to Linker->Input->Additional Dependencies). Is there any way to actually make the library directory setting work, i.e. not having to manually add every lib I'm gonna use?

Share this post


Link to post
Share on other sites
I don't think you can just set a directory and let the compiler automatically use all the libs there. It would not know which of them you really want and need.

Btw, you can also link the lib files using this code, you don't have to do it in the project properties:

#pragma comment(lib, "d3dx9.lib")

Share this post


Link to post
Share on other sites

This topic is 2843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this