Sign in to follow this  
yosh-summer

LNK2019 errors when using Direct3D9

Recommended Posts

GERMAN Ich habe ein Problem mit dem Visual Studio 2005 Compiler. Ich bekomme folgende Fehlermeldungen: error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_D3DXMatrixPerspectiveFovLH@20" in Funktion ""void __cdecl init(void)" (?init@@YAXXZ)". error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_Direct3DCreate9@4" in Funktion ""void __cdecl init(void)" (?init@@YAXXZ)". error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_D3DXMatrixTranslation@16" in Funktion ""void __cdecl render(void)" (?render@@YAXXZ)". Jedoch habe ich keine Ahnung mehr was ich tun soll. Ich habe bei dem Compiler Einstellungen, die Verweise auf alle SDK-Lib & Includes eingestellt, habe in den Projekteinstellungen->Linke->Befehlszeile die "d3d9.lib & d3dx9.lib" hineingegeben und weiß aber nicht mehr was ich tun soll. Ich habe in der MSDN nachgeschaut und gefunden dass die Funktion MatrixTranslation in der drdx9.lib enthalten ist. WAS SOLL ICH NOCH MACHEN HABE KEINE AHNUNG MEHR!!!! ENGLISH Hi to everybody, what shoud I do with these errors. I allways get Link Errors in Visual Studio 2005 Compiler (see above please). But I added by the VS-Options the SDK Libs, and Includes and in the project abilitys i add d3d9.lib & d3dx9.lib. What should i do? EDIT: 1. Please use a more appropriate subject line, all caps is also considered "shouting" and isn't really necessary. 2. No need for the bad language - these forums cater to a wide audience, some of whom won't want to see such things. [Edited by - jollyjeffers on October 3, 2006 10:12:07 AM]

Share this post


Link to post
Share on other sites
Are you using Visual Studio express edition?
Just to be on the safe side try these settings:
project>>[project name]properties>>ConfigurationProperties>>Linker>>
Input>>AdditionalDependencies>>d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib Dxerr.lib dxerr9.lib winmm.lib dinput8.lib
(using Active(Debug) Active(win32))
#define WIN32_LEAN_AND_MEAN
#define STRICT
#ifdef _DEBUG
#define D3D_DEBUG_INFO
#endif
#include <d3dx9.h>
#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
#include <time.h>
#include <Dxerr9.h>
#include <tchar.h>
//etc...

This is probably the problem:
Tools>>Options>>Projects and Solutions>>VC++ Directories

(Using Platform: Win32 and Show Directories for: Include Files)
make sure caps lock is off and insert on the top-most line:
C:\Program Files\Microsoft DirectX SDK (April 2006)\Include
[or whatever the correct path is for your SDK]

(Show Directories for: Library Files)
C:\Program Files\Microsoft DirectX SDK (April 2006)\Lib\x86

After that, I might even try checking the paths/directories and make sure nothing's missing or corrupt.

Share this post


Link to post
Share on other sites
Input>>AdditionalDependencies>>d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib Dxerr.lib dxerr9.lib winmm.lib dinput8.lib

or (i wish they had this back in the day)

#pragma comment( lib, "dxerr.lib" )
#pragma comment( lib, "dxguid.lib" )
#if defined(DEBUG) || defined(_DEBUG)
#pragma comment( lib, "d3dx9d.lib" )
#else
#pragma comment( lib, "d3dx9.lib" )
#endif
#pragma comment( lib, "d3d9.lib" )
#pragma comment( lib, "winmm.lib" )
#pragma comment( lib, "comctl32.lib" )

Share this post


Link to post
Share on other sites
I have an idea:

I tried a project of me which was ok before in an older configuration of VS. But when I try to run this project, the compiler told me, that he can't find the d3d9.dll. In this case i will try to reinstall the directX SDK, because it might be damaged. This can be the reason for all my problems. I will post later when i have tried this. THX to all post.

Share this post


Link to post
Share on other sites

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