I couldnt decide whether to put this question here (as I'm programming with DirectX) or in the C++ section.

I seem to only get this error occasionally. I understand the MSDN examples, and how they work. But I'm wondering if anyone can give a more human explanation?

See, this only happens to me when I'm trying to use DirectX objects/functions, etc. For example these lines:

D3DXVECTOR3 vEyePt( 0.0f, 3.0f,-5.0f );
    D3DXVECTOR3 vLookatPt( 0.0f, 0.0f, 0.0f );
    D3DXVECTOR3 vUpVec( 0.0f, 1.0f, 0.0f );

Generate an LNK2019 each. They're call from within one of my own functions "SetupMatrices()".

I've actually been building this from a tutorial (its beginners DirectX for C++ Veterans) where the source code compiles and runs perfectly, yet, even pasting the source into my project (or even only pasting SMALL parts of it) yields the Unresolved external errors.

I dont understand the error fully, nor what I can do to resolve it. Any suggestions?

Thanks!

*Also, I have had this project working before i tried setting up matrices and whatnot, so I know the includes and libs are setup properly. I've compared my code to the tutorial source, line for line, and I can't see anything that is noticibly different. There are minor differences, but I can't see them affecting functionality.

The problem is that D3DXVECTOR3 is not being found for whatever
reason. Have you linked ALL of the lib and headers? Maybe something
got corrupted.

>>I've actually been building this from a tutorial (its beginners DirectX for C++ Veterans) where the source code compiles and runs perfectly, yet, even pasting the source into my project (or even only pasting SMALL parts of it) yields the Unresolved external errors.

This tells me that you are not linking your lib and headers properly.
Why, because when you unzip their project, included are the dlls
for directX and thus the .exe works because it finds them in the same
directory. But you say that you pasted the code and it gives you
a linking error, which definitely means that you did not link the files
correctly.

Thanks. I'll look into it. The only problem I see with the solution is that I can get a blank device up and rendering in the same project (you know, the blue-filled window). Are there separate libraries that include the DX maths and the Device classes?

What I've got is (under right click project->properties->VC++ Directories->Include Directories) $(DXSDK_DIR)include

And under Library directories I have $(DXSDK_DIR)lib\x86\

I havent modified anyhting under executable directories, reference directories, source directories, or exclude directories. Do I need to add something? or is there a typo in my includes/library directories?

I appreciate the insight you've given me. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.