Friday, November 11, 2005

DirectX in Visual Studio .NET 2003

Just ran my first DirectX program in Visual Studio .NET.

Source code from Andy's tutorial

Two linking errors which popped up were:

Error 1. direct3 error LNK2019: unresolved external symbol _Direct3DCreate8@4 referenced in function "long __cdecl InitialiseD3D(struct HWND__ *)" (?InitialiseD3D@@YAJPAUHWND__@@@Z)

Solution:
Did a Google search and managed to find a single page with thread about solving this particular error; but it was in Polish! (probably a better selection / editing of the words would've given me more pages, some certainly in English). Used the online Polish translator, which decoded me to give:

"This error means, that with library related with title not zlinkowałeś, you have included (have switched on) which (who). If you have included (have switched on) d3d8.h, you must add file in options of projects > linkera d3d8.lib, if you have included (have switched on) d3dx8.h, then you must add d3d8.lib and d3dx8.lib. It will it won't hurt except it dxerr8.lib. "

Project > Properties > Linker > Command Line and d3d8.lib in Additional Options solved the problem.

Error 2: direct3 error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

Solution: A simple Google search.
Project > Properties > Linker > System and changing Subsystem to Windows solves the problem.

0 Comments:

Post a Comment

<< Home