المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem with WinDef.h



C++ Programming
03-31-2009, 08:58 AM
In my VC++ 8.0 project I got the following errors:

1>d:\development\glestold\source\shared_lib\sources\graphics\interpolation.cpp(19) : fatal error C1083: Cannot open include file: 'windef.h': No such file or directory

1>d:\development\glestold\source\shared_lib\include\platform\sdl\sdl_opengl.h(32) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

I searched and found those files in the PlatformSDK folder i.e

C:\Program Files\Microsoft Platform SDK\Include folder.

I included this and the corresponding lib path in the project settings.

Now I get a punch of errors in winnt.h file in which I didn't do any modifications(system file).
The list of errors in the winnt.h file are:

1>------ Rebuild All started: Project: GlestLib, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'GlestLib', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>buffer.cpp
1>camera.cpp
1>context.cpp
1>font.cpp
1>font_manager.cpp
1>graphics_interface.cpp
1>interpolation.cpp
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(8319) : error C2065: 'PCONTEXT' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2059: syntax error : ')'
1>c:\program files\microsoft platform sdk\include\winnt.h(9594) : error C3861: '__readfsdword': identifier not found
1>model.cpp
1>model_manager.cpp
1>particle.cpp
1>pixmap.cpp
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\winnt.h(8319) : error C2065: 'PCONTEXT' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
1>c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2059: syntax error : ')'
1>c:\program files\microsoft platform sdk\include\winnt.h(9594) : error C3861: '__readfsdword': identifier not found
1>quaternion.cpp
1>shader.cpp
1>shader_manager.cpp
1>texture.cpp
1>texture_manager.cpp
1>context_gl.cpp
1>font_gl.cpp
1>model_renderer_gl.cpp
1>opengl.cpp
1>Generating Code...
1>Compiling...
1>particle_renderer_gl.cpp
1>shader_gl.cpp
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::end' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(88) : see declaration of 'Shared::Graphics::Gl::ShaderGl::end'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::load' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(86) : see declaration of 'Shared::Graphics::Gl::ShaderGl::load'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(98) : warning C4250: 'Shared::Graphics::Gl::VertexShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::compile' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(87) : see declaration of 'Shared::Graphics::Gl::ShaderGl::compile'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::end' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(88) : see declaration of 'Shared::Graphics::Gl::ShaderGl::end'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::load' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(86) : see declaration of 'Shared::Graphics::Gl::ShaderGl::load'
1>d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(107) : warning C4250: 'Shared::Graphics::Gl::FragmentShaderGl' : inherits 'Shared::Graphics::Gl::ShaderGl::Shared::Graphics::Gl::ShaderGl::compile' via dominance
1> d:\development\glestold\source\shared_lib\include\graphics\gl\shader_gl.h(87) : see declaration of 'Shared::Graphics::Gl::ShaderGl::compile'
1>text_renderer_gl.cpp
1>texture_gl.cpp
1>factory_repository.cpp
1>gl_wrap.cpp
1>platform_menu.cpp
1>platform_util.cpp
1>d:\development\glestold\source\shared_lib\sources\platform\sdl\platform_util.cpp(14) : fatal error C1083: Cannot open include file: 'glob.h': No such file or directory
1>socket.cpp
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(69) : error C2511: 'Shared::Platform::Socket::Socket(int)' : overloaded member function not found in 'Shared::Platform::Socket'
1> d:\development\glestold\source\shared_lib\include\platform\win32\socket.h(43) : see declaration of 'Shared::Platform::Socket'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(81) : error C2039: 'close' : is not a member of '`global namespace''
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(81) : error C3861: 'close': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(89) : error C3861: 'ioctl': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2065: 'ssize_t' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2146: syntax error : missing ';' before identifier 'bytesSent'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(99) : error C2065: 'bytesSent' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(107) : error C2146: syntax error : missing ';' before identifier 'bytesReceived'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(107) : error C2065: 'bytesReceived' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(115) : error C2146: syntax error : missing ';' before identifier 'err'
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(115) : error C2065: 'err' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C2065: 'F_SETFL' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C2065: 'O_NONBLOCK' : undeclared identifier
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(124) : error C3861: 'fcntl': identifier not found
1>d:\development\glestold\source\shared_lib\sources\platform\posix\socket.cpp(243) : error C2664: 'setsockopt' : cannot convert parameter 4 from 'int *' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>thread.cpp
1>********cpp
1>window_gl.cpp
1>sound.cpp
1>sound_file_loader.cpp
1>sound_interface.cpp
1>sound_player.cpp
1>checksum.cpp
1>conversion.cpp
1>leak_dumper.cpp
1>profiler.cpp
1>Generating Code...
1>Compiling...
1>properties.cpp
1>random.cpp
1>util.cpp
1>xml_parser.cpp
1>Generating Code...
1>Build log was saved at "file://d:\Development\GlestOld\GlestLib\Debug\BuildLog.htm"
1>GlestLib - 34 error(s), 8 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

How do I get around these errors?
I've already posted this in this forum at the following link:


http://www.codeproject.com/script/Forums/View.aspx?fid=1647&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=401#xx0xx[^ (http://www.codeproject.com/script/Forums/View.aspx?fid=1647&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=401#xx0xx)]


The reason for reposting is, I couldn't reply to the members queries since I was on leave. Please help me.