Hi,
At the moment, I try to practicing c++ with directx, I found good tutorials for that, I started with "Tutorial 1: Create a Window" in this link:

http://www.two-kings.de/tutorials/dxgraphics/dxgraphics01.html

I do all steps ok like the tutorial, but when i compile it gave me errors, I'm using VC++ 2008 express and DX SDK Nov 2008, I attached source file .. I hope that one correct my mistakes

------ Build started: Project: create_window, Configuration: Debug Win32 ------
Compiling...
capplication.cpp
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(3) : error C2143: syntax error : missing ';' before 'CApplication::{ctor}'
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(37) : error C2146: syntax error : missing ';' before identifier 'WindowClass'
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(38) : error C2146: syntax error : missing ';' before identifier 'WindowClass'
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(40) : error C2440: '=' : cannot convert from 'const char [10]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(57) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [10]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(69) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(71) : error C2601: 'CApplication::KillWindow' : local function definitions are illegal
        c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(22): this line contains a '{' which has not yet been matched
c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(74) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\iammfa\documents\visual studio 2008\projects\create_window\capplication.cpp(22)' was matched
main.cpp
c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.cpp(3) : error C3646: 'CApplication' : unknown override specifier
c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.cpp(3) : error C3646: 'g_App' : unknown override specifier
c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.cpp(5) : warning C4229: anachronism used : modifiers on data are ignored
c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.cpp(5) : error C2470: 'WinMain' : looks like a function definition, but there is no parameter list; skipping apparent body
winproc.cpp
c:\users\iammfa\documents\visual studio 2008\projects\create_window\winproc.cpp(3) : error C3646: 'LRESULT' : unknown override specifier
c:\users\iammfa\documents\visual studio 2008\projects\create_window\winproc.cpp(3) : error C2143: syntax error : missing ';' before '__stdcall'
c:\users\iammfa\documents\visual studio 2008\projects\create_window\winproc.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\users\iammfa\documents\visual studio 2008\projects\create_window\winproc.cpp(7) : error C2556: 'int WindowProcedure(HWND,UINT,WPARAM,LPARAM)' : overloaded function differs only by return type from 'LRESULT WindowProcedure(HWND,UINT,WPARAM,LPARAM)'
        c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.h(24) : see declaration of 'WindowProcedure'
c:\users\iammfa\documents\visual studio 2008\projects\create_window\winproc.cpp(7) : error C2371: 'WindowProcedure' : redefinition; different basic types
        c:\users\iammfa\documents\visual studio 2008\projects\create_window\main.h(24) : see declaration of 'WindowProcedure'
Generating Code...
Build log was saved at "file://c:\Users\iammfa\Documents\Visual Studio 2008\Projects\create_window\Debug\BuildLog.htm"
create_window - 16 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Edited 3 Years Ago by Nick Evan: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.