Problems compiling project in Visual C++ studio
-
I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please. Tokorie
-
I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please. Tokorie
Tokorie wrote:
recently downloaded Visual C++ Studio
Downloaded the express edition? If so, it doesn't come with MFC :(
-
Tokorie wrote:
recently downloaded Visual C++ Studio
Downloaded the express edition? If so, it doesn't come with MFC :(
I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^] but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors
-
I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^] but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors
Hmmm the last time I checked, you could only build native apps with the express edition.
-
Hmmm the last time I checked, you could only build native apps with the express edition.
-
It is able to do more now but needs to have the settings done correctly and that is the problem I keep having.
Tokorie wrote:
It is able to do more now
ok... so what about adding C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc to the include directories?
-
Tokorie wrote:
It is able to do more now
ok... so what about adding C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc to the include directories?
-
Can you help with this error ?? C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include
Are you including windows.h explicitly somewhere? Also make sure you have something like this before any MFC header file includes... #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif Even if you get past this, the MFC included with the platform SDK is from VC 6. If you get it to compile and run on 2005 express you will be the first I believe. Even then, you'd be using MFC version 4.x :(
-
Are you including windows.h explicitly somewhere? Also make sure you have something like this before any MFC header file includes... #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif Even if you get past this, the MFC included with the platform SDK is from VC 6. If you get it to compile and run on 2005 express you will be the first I believe. Even then, you'd be using MFC version 4.x :(
-
that didn't help.... the same problem persists and this what it points to when I compile and it gives me that error #ifdef _WINDOWS_ #error WINDOWS.H already included. MFC apps must not #include #endif
According to http://msdn.microsoft.com/vstudio/express/support/faq/[^], MFC and ATL are not included. On what basis do you believe this has changed ? MFC does not come with the platform SDK, unless it's the 64 bit version ( so I've been told ).
Christian Graus - C++ MVP