...\projects\mp3player\stdafx.h(15) : fatal error C1083: Cannot open
include file: 'afxwin.h': No such file or directory
How should I fix it? Following is the content of stdafx.h:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__3B453056_316D_4CFF_B75F_911D4BA2CAEB__INCLUDED_)
#define AFX_STDAFX_H__3B453056_316D_4CFF_B75F_911D4BA2CAEB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common
Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately
before the previous line.
#endif //
!defined(AFX_STDAFX_H__3B453056_316D_4CFF_B75F_911D4BA2CAEB__INCLUDED_)
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04) Linux 2.6.25.6
^ ^ 18:34:01 up 2 days 8:28 2 users load average: 1.01 1.08 1.06
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/
>
>I am trying to compile some sample projects using Visual C++ Studio
>Express 2008, and got the following error:
>
>...\projects\mp3player\stdafx.h(15) : fatal error C1083: Cannot open
>include file: 'afxwin.h': No such file or directory
Hi there,
This file is part of the MFC library, which unfortunately is not
included with the Visual Studio Express Edition. To use MFC, you need
either the Standard or Professional Edition.
You can download a 90-day trial of the Professional Edition here:
http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx
Chris
That's my worst fear when I tried and failed to install the
VS 2008 SDK.
> You can download a 90-day trial of the Professional Edition here:
> http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx
I only need to build simple projects.... anyway to work around it?
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04) Linux 2.6.25.6
^ ^ 20:13:01 up 2 days 10:07 2 users load average: 1.00 1.00 1.00
Is there something like Visual C++ 2008 (ie, C++ only, nothing
else)?
Or maybe a VS 2008 Home and Student Edition?
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04) Linux 2.6.25.6
^ ^ 20:15:01 up 2 days 10:09 2 users load average: 1.00 1.00 1.00
Don't use MFC in your simple projects.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
>> You can download a 90-day trial of the Professional Edition here:
>> http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx
>
>Is there something like Visual C++ 2008 (ie, C++ only, nothing
>else)?
>
>Or maybe a VS 2008 Home and Student Edition?
If you're a student, it may be possible for you to buy the
Professional edition at a reduced price - check your local software
suppliers.
Chris
Fine. But is it going to be really hard to
build a GUI program without MFC?
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04) Linux 2.6.25.6
^ ^ 18:05:01 up 3 days 7:59 1 user load average: 1.01 1.02 1.15
Building a GUI program in Win32 without MFC is "harder", in the sense that
for example you have to study what a message pump is, what a window
procedure for message handling is, and you have to implement them.
Moreover, MFC offers C++ classes for buttons, list view, etc. instead with
pure Win32 C++ programming you have to write them yourself.
And MFC has also a robust off-the-shelf document-view architecture, which
can help you a lot if your application model can be designed to fit the
doc/view model (which is not always the case, of course).
However, you may consider using wxWidgets as an alternative library if you
can't use MFC because of VC++ Express version.
wxWidgets is similar to MFC (it has message map macros, etc.), and someone
says that wxWidgets is even better designed than MFC.
What lacks in wxWidgets is the rich ecosystem of controls that is available
for MFC (for free, too! For example, go to such a jewel website like
CodeProject: www.codeproject.com : it's full of MFC useful and quality
controls.)
Giovanni
To add to what I wrote in my previous post, you may consider using WTL with
VC++ Express, too:
Using WTL with Visual C++ 2005 Express Edition
http://www.codeproject.com/KB/wtl/WTLExpress.aspx
HTH,
Giovanni