467,923 Members | 1,857 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

file exists but still getting file not found error

lifeisgreat20009
I am getting the following error :-

1>------ Build started: Project: Polygon Drawer, Configuration: Debug Win32 ------
1>Compiling...

1>Dialog.cpp

1>g:\my subjects\3rd semester\project samples for 3rd semester\visual c++ project samples\polygon drawer\dialog.h(4) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

1>DrawerApp.cpp

1>g:\my subjects\3rd semester\project samples for 3rd semester\visual c++ project samples\polygon drawer\mainfrm.h(8) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

1>MainFrm.cpp

1>g:\my subjects\3rd semester\project samples for 3rd semester\visual c++ project samples\polygon drawer\mainfrm.h(8) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

1>Generating Code...

1>Build log was saved at "file://g:\MY SUBJECTS\3RD SEMESTER\PROJECT SAMPLES FOR 3RD SEMESTER\VISUAL C++ PROJECT SAMPLES\Polygon Drawer\Debug\BuildLog.htm"

1>Polygon Drawer - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I get the above error when I execute the code of my VC++ project....
I searched for this file afxwin.h in my PC and copied it to the directory
g:\my subjects\3rd semester\project samples for 3rd semester\visual c++ project samples\polygon drawer\

But still getting the same error after compiling and executing....
Please somebody help me regarding this................
Aug 6 '08 #1
  • viewed: 12911
Share:
3 Replies
weaknessforcats
Expert Mod 8TB
How is afxwin.h included?

If it is:

#include "afxwin.h"

then what you did in copying the file to your project directory will work.

If it is:

#include <afxwin.h>

then the file must be along a pre-defined path. (Tools/Options/Projects and Solutions/VC++ Directories/on right select "include files").
Aug 6 '08 #2
Banfa
Expert Mod 8TB
afxwin.h is an MFC include file (and therefore I assume you are creating an MFC program). You should not copy it to your source directory or anywhere else.

If the compiler can not find it then the compiler is not set-up correctly.

Where did you find this file on your computer? Were any other MFC include files there? How are you calling the compiler, are you setting the include paths correctly?
Aug 6 '08 #3
Expert 256MB
If you are using visual C++ express MFC is not supported. There have been work arounds posted. You can read this thread for more details.
Aug 7 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by lamar_air | last post: by
9 posts views Thread by Hans-Joachim Widmaier | last post: by
5 posts views Thread by matt dittman | last post: by
17 posts views Thread by Peter Duniho | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.