SolvedDxgitype Error

Posts 1–7 of 7 · Page 1 of 1
Dxgitype Error
Code:
   1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2059: syntax error : '('
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2143: syntax error : missing ')' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2143: syntax error : missing ';' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57): error C2238: unexpected token(s) preceding ';'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2059: syntax error : '('
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2143: syntax error : missing ')' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2143: syntax error : missing ';' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2535: 'float DXGI_RGB::D3DCOLOR(void)' : member function already defined or declared
                 c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57) : see declaration of 'DXGI_RGB::D3DCOLOR'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(58): error C2238: unexpected token(s) preceding ';'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2059: syntax error : '('
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2143: syntax error : missing ')' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2143: syntax error : missing ';' before '|'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2535: 'float DXGI_RGB::D3DCOLOR(void)' : member function already defined or declared
                 c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(57) : see declaration of 'DXGI_RGB::D3DCOLOR'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2059: syntax error : ')'
     1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(59): error C2238: unexpected token(s) preceding ';'

ok in EVERY DirectX source on C++ , i get dxgitype error , what should i do to fix it ?
You have a type redefinition going on, try fiddling your headers.

For example if you have this:

Code:
#include <d3d.h>
#include <d3d9x.h>

// try changing it to:

#include <d3d9x.h>
#include <d3d.h>
If you've tried all combinations, try googeling to see if there's a bug that specific sdk version (june 2010). These problems have three likely causes:

Someone has forgotten to protect his/her header against multiple inclusion (though this often produces linker errors)
Someone has used the same #ifndef/#define definition in his header file
A mistake has been made by them/you/anyone and as a result the file is now corrupt ( missing ';', ')' or '(' )

Also if you're building for metro, you need a newer sdk, 2010 is not compatible.
Quote Originally Posted by .::SCHiM::. View Post
You have a type redefinition going on, try fiddling your headers.

For example if you have this:

Code:

#include <d3d.h>
#include <d3d9x.h>

// try changing it to:

#include <d3d9x.h>
#include <d3d.h>
If you've tried all combinations, try googeling to see if there's a bug that specific sdk version (june 2010). These problems have three likely causes:

Someone has forgotten to protect his/her header against multiple inclusion (though this often produces linker errors)
Someone has used the same #ifndef/#define definition in his header file
A mistake has been made by them/anyone and as a result the file is now corrupt ( missing ';', ')' or '(' )

Also if you're building for metro, you need a newer sdk, 2010 is not compatible.
i tried all combinations but failed , i have June 2010 and i couldnt fine newer than june 2010

can u tell me which 1 is the latest ?
make a new empty project and make a new cpp file. fill it with the following

Code:
#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, INT nShow)
{
    return 0;
}
and compile it
if the error presents, the sdk is probably damaged and you will need to re install it.
Most likely trying to leech something and can't find the problem. meh
Closed....
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us