merlino64bit
Programmer
Hi: I've now been programming for almost a year with CodeBlocks and decided to switch to VisualC++ as I joined a team that is using it. So I install it and try to create a blank project: everything ok.
The I add this line:
#include <windows.h>
Compiler says that the file does not exist so I copy window.h to the VC++ include folder along with all the other headers i had in the CodeBlocks include folder.
I try to compile again and here's what i get:
1>------ Build started: Project: myOwn, Configuration: Debug Win32 ------
1>Compiling...
1>myOwn.cpp
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3035) : warning C4103: 'e:\applications\microsoft visual studio 8\vc\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3327) : warning C4103: 'e:\applications\microsoft visual studio 8\vc\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3423) : warning C4068: unknown pragma
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3428) : warning C4068: unknown pragma
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
1>Build log was saved at "file://c:\Documents and Settings\Administrator\Documenti\Visual Studio 2005\Projects\myOwn\myOwn\obj\Debug\BuildLog.htm"
1>myOwn - 8 error(s), 4 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas?
Thanks in advance
The I add this line:
#include <windows.h>
Compiler says that the file does not exist so I copy window.h to the VC++ include folder along with all the other headers i had in the CodeBlocks include folder.
I try to compile again and here's what i get:
1>------ Build started: Project: myOwn, Configuration: Debug Win32 ------
1>Compiling...
1>myOwn.cpp
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3035) : warning C4103: 'e:\applications\microsoft visual studio 8\vc\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3327) : warning C4103: 'e:\applications\microsoft visual studio 8\vc\include\winnt.h' : alignment changed after including header, may be due to missing #pragma pack(pop)
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3423) : warning C4068: unknown pragma
1>e:\applications\microsoft visual studio 8\vc\include\winnt.h(3428) : warning C4068: unknown pragma
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1253) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C2144: syntax error : 'void' should be preceded by ';'
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\applications\microsoft visual studio 8\vc\include\winbase.h(1313) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
1> e:\applications\microsoft visual studio 8\vc\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
1>Build log was saved at "file://c:\Documents and Settings\Administrator\Documenti\Visual Studio 2005\Projects\myOwn\myOwn\obj\Debug\BuildLog.htm"
1>myOwn - 8 error(s), 4 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas?
Thanks in advance