   First DirectX App Going Awry.  Help?
  Okay, I'm following an online tutorial directed towards DX10.  I'm following it almost completely (only edits are variable names to fit my casing style better.) It's just the typical "Turn the whole window blue" D3D introduction--Direct X equivalent to "Hello World".  The entire source code is this:____________________________________________________________//Include standard Win32 API and Direct3D headers#include &lt;Windows.h&gt;#include &lt;WindowsX.h&gt;#include &lt;D3D10.h&gt;#include &lt;D3DX10.h&gt;//Linking to necessary direct3D libraries#pragma comment(lib, "d3d11.lib")#pragma comment(lib, "d3dx11.lib")//Global d3D variable declarationsID3D10Device * pDevice;//Pointer to the Direct3D Device InterfaceID3D10RenderTargetView * pRTV;//Pointer to the Render Target View IDXGISwapChain * pSwapChain;//Pointer to the Swap Chain//Standard Function Prototypesvoid initD3D(HWND hWnd);//Sets up and initializes Direct3Dvoid render_fram(void);//Renders a single framevoid cleanD3D(void);//Closes D3D and releases memory//Window Procedure PrototypesLRESULT CALLBACK WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);//Standard Procedure Prototype//InitD3D() Header and Body--Initializes and Prepares D3D for usevoid initD3D(HWND hWnd){DXGI_SWAP_CHAIN_DESC scd; //Create scruct to hold Swap Chain InformationZeroMemory(&scd, sizeof(DXGI_SWAP_CHAIN_DESC));//Cleans scd memory addresses of trashscd.BufferCount = 1;//Creates two buffers, one front and one back bufferscd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;//Specifies 32-bit color to be usedscd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;//Specifies how to use swap chainscd.OutputWindow = hWnd;//Set the Window to be used by Direct3Dscd.SampleDesc.Count = 1;//Sets the level of multi-samplingscd.SampleDesc.Quality = 0;//Sets the quality of multi-samplingscd.Windowed = TRUE;//Sets to Window'd or Full Screen mode//Function to create the Device and SwapChain Class from the information in scd structD3D10CreateDeviceAndSwapChain(NULL,D3D10_DRIVER_TYPE_HARDWARE,NULL,0,D3D10_SDK_VERSION,&scd,&pSwapChain,&pDevice);//Get the Memory Address of the Swap Chain's Back Buffer and use it to create the Render Target ViewID3D10Texture2D * pBackBuffer;//Pointer to a 2d texture interface, used for the swap chain back bufferpSwapChain-&gt;GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*) &pBackBuffer);//Gets the address of the back bufferpDevice-&gt;CreateRenderTargetView(pBackBuffer, NULL, &pRTV);//Creates the Render Target--essentially making the single back buffer our render targetpBackBuffer-&gt;Release();//Releases pBackBuffer from resources//Set the Render Target View to the Back BufferpDevice-&gt;OMSetRenderTargets(1, &pRTV, NULL);//Sets the Render Target to the ObjectD3D10_VIEWPORT viewport;//Creates a struct to hold the viewport dataZeroMemory(&viewport, sizeof(D3D10_VIEWPORT));//Cleans the viewport's memory of trash valuesviewport.TopLeftX = 0;//Sets the top-left to 0viewport.TopLeftY = 0;//Sets the top-right to 0viewport.Width = 800;//Sets the Viewport Width to the window Widthviewport.Height = 600; //Sets the Viewport Height to the window HeightpDevice-&gt;RSSetViewports(1, &viewport);//Set the viewport}//This is the function used to render a single frame of action:void render_frame(void){//Clear the Window and replace it with a deep bluepDevice-&gt;ClearRenderTargetView(pRTV, D3DXCOLOR(0.0f, 0.2f, 0.4f, 1.0f));//Do Back Buffer Rendering here//Display the Rendered Frame!pSwapChain-&gt;Present(0, 0);}//This is the function that cleans and closes Direct3Dvoid cleanD3D(void){pSwapChain-&gt;Release();//Close the Swap ChainpRTV-&gt;Release();//Close the Render Target ViewpDevice-&gt;Release();//Close the 3D Device}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow){HWND hWnd;//Create Window HandleWNDCLASSEX wc;//Create Window StructureZeroMemory(&wc, sizeof(WNDCLASSEX));wc.cbSize = sizeof(WNDCLASSEX);wc.style = CS_HREDRAW | CS_VREDRAW;wc.lpfnWndProc = WinProc;wc.hInstance = hInstance;wc.hCursor = LoadCursor(NULL, IDC_ARROW);wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);wc.hbrBackground = (HBRUSH)COLOR_WINDOW;wc.lpszClassName = TEXT("WindowClass");RegisterClassEx(&wc);hWnd = CreateWindowEx(NULL,wc.lpszClassName,TEXT("First Direct3D Program!"),WS_OVERLAPPEDWINDOW,300, 300,800, 600,NULL,NULL,hInstance,NULL);ShowWindow(hWnd, iCmdShow);//INITIALIZE D3D ON WINDOWinitD3D(hWnd);MSG msg;while(TRUE){if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){TranslateMessage(&msg);DispatchMessage(&msg);if (msg.message == WM_QUIT)break;}render_frame();}//CLEAN AND CLOSE DirectX and COMcleanD3D();return msg.wParam;}// this is the main message handler for the programLRESULT CALLBACK WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){    switch(message)    {   case WM_DESTROY:  { PostQuitMessage(0); return 0;  } break;    }    return DefWindowProc (hWnd, message, wParam, lParam);}_____________________________________________________________Here's my error: Error1error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "void __cdecl initD3D(struct HWND__ *)" (?initD3D@@YAXPAUHWND__@@@Z)First Direct3D program.objdx11 tutorialsNow, given they make the Error Report more difficult to understand than teachin a deaf man a second language, and my lack of experience, I'm really unable to decypher what I did wrong.Even if you don't feel like finding the error, can someone at least point me in the right direction?  Where should I look for errors at?[Edited by - DotNetDev on May 13, 2010 12:59:36 AM]
  You should use [ source ] [ /source ] tags when posting code...Quote:Error 1 error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function...This is a linker error. This means that your program compiled successfully, but then when trying to piece together the final EXE, it couldn't find this function.This usually occurs because you didn't tell it the names of the LIB files where it can find this function... however, you do have the following://Linking to necessary direct3D libraries#pragma comment(lib, "d3d11.lib")#pragma comment(lib, "d3dx11.lib")I'm not exactly sure, but you could try changing those to be d10 instead of d11.   ;  Wow... I changed those once.. When I undid a few changes, I mighta changed them back.***Checking...***Yes, that was exactly the issue! :-)The thing is, I downloaded DX11 SDK (The Feb 2010 release). I honestly assumed that functions would be added, but existing functions would remain the same or maintain compatibility.  Thank you for the help (and I'll do the source tags next time, sorry).   