| | |
windows.h error
![]() |
I am using this code here:
But no matter what i do i keep getting this built error:
------ Build started: Project: Gui, Configuration: Debug Win32 ------
Compiling...
Gui.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(236) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(236) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C2146: syntax error : missing ';' before identifier 'Buffer'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I was wondering if anyone will be able to help me out so it will be able to compile.
Cheers
Paul
c++ Syntax (Toggle Plain Text)
#include "stdafx.h" #include "windows.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK); return 0; }
But no matter what i do i keep getting this built error:
------ Build started: Project: Gui, Configuration: Debug Win32 ------
Compiling...
Gui.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(236) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(236) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C2146: syntax error : missing ';' before identifier 'Buffer'
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(7818) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I was wondering if anyone will be able to help me out so it will be able to compile.
Cheers
Paul
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
I started a new empty windows project, pasted your code and it compiled without any errors or warnings. When you created your project did you create a console project or windows project. It must be a windows project.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Yeah i am using the "Win32 Project" and even the default one dosent compile. Do i have to reinstall an SDK? Or is there something else?
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
What version of Windows are you running? I have Vista but some people say that VC++ 6.0 doesn't work right on that os. Recommend you upgrade to the latest version of the compiler -- VC++ 2008 Express is free but doesn't support MFC.
Last edited by Ancient Dragon; Mar 14th, 2009 at 11:53 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Yeah it runs on my second computer fine.. The only problem seems to be with winnt.h.. Should i just redownload that file from somewhere? And i am using XP, and Visual C++ 6
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
•
•
Join Date: Nov 2007
Posts: 978
Reputation:
Solved Threads: 208
With MSVC 6.0, the latest Windows SDK that can be used is the Windows Server 2003 Platform SDK
Either switch to that old SDK or get e.g. a VS Express edition, which works with your current SDK.
Either switch to that old SDK or get e.g. a VS Express edition, which works with your current SDK.
Last edited by mitrmkar; Mar 15th, 2009 at 3:09 am.
Thanks Ancient Dragon, that fixed the issues with winnt.h, but winbase.h is stuffed. I think this comes from my brother trying direct x with no success some time ago.
So does anyone know where i can get a replacement winbase.h?
Or perhaps where i could just re-download all headers?
So does anyone know where i can get a replacement winbase.h?
Or perhaps where i could just re-download all headers?
Last edited by Paul Thompson; Mar 16th, 2009 at 3:43 am.
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
![]() |
Similar Threads
- Windows Error - Help Me Please!!! (Windows NT / 2000 / XP)
- Windows error 7032, no sound, 0x7c9105f8 (Windows NT / 2000 / XP)
- windows error service spyware (Viruses, Spyware and other Nasties)
- windows error service-popups keep coming back (Viruses, Spyware and other Nasties)
- windows error service spyware message (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: windows api help
- Next Thread: Child removal problem with Xerces
| Thread Tools | Search this Thread |
action api array auto based beginner binary bitmap c++ c/c++ calculator challenge char class classes code coding compile console conversion count createcopyofanyfileinc delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game garbage givemetehcodez graph gui hmenu homeworkhelp homeworkhelper iamthwee ifstream input insert int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node noob output parameter pointer primenumbersinrange problem program programming project python random read recursion reference rpg sockets string strings temperature template test text text-file tree url variable vector video win32 windows winsock wordfrequency wxwidgets






