473,657 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file exists but still getting file not found error

lifeisgreat20009
70 New Member
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\projec t 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.cp p

1>g:\my subjects\3rd semester\projec t 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\projec t 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\PROJEC T SAMPLES FOR 3RD SEMESTER\VISUAL C++ PROJECT SAMPLES\Polygon Drawer\Debug\Bu ildLog.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\projec t 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
3 14705
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
9,065 Recognized Expert Moderator Expert
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
Studlyami
464 Recognized Expert Contributor
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

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

Similar topics

10
17193
by: lamar_air | last post by:
I have a python script and i want to delete a file on my computer c:\....\...\.. .txt what's the script to do this? I know how to write to files but i also need to know how to delete a file.
9
3198
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is indeed also true for our language of choice, Python. Its file type allows some extraordinary convenient access like: for line in open("blah"): handle_line(line)
5
1113
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up until the CDO.DropDirectory.GetMessages() method is called. At this point, the files are locked until I shut down the service. After processing and delivery, I need to be able to delete all the files in the drop directory. I can delete them via...
6
13717
by: Chad Crowder | last post by:
Getting the following error on my production server whether the file exists or not: "System.IO.IOException: Cannot create a file when that file already exists." Here's the code generating the error (seems to be happening when I try creating a directory) If dirmgr.Exists("s:\blah\" & txt_name.Text) Then lblerror.Text = lblerror.Text & "Unable to build physical path. " &
18
4335
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't get it to upload a file to the FTP server. I just get a "Cannot connect to remote server" error after this TRY: s = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
17
8018
by: Peter Duniho | last post by:
I searched using Google, on the web and in the newsgroups, and found nothing on this topic. Hopefully that means I just don't understand what I'm supposed to be doing here. :) The problem: I am trying to use the SaveFileDialog class to get a filename, which is subsequently opened for writing (write access, read sharing, but using read/write sharing doesn't make the problem go away anyway). Sometimes, on the statement where I...
7
19079
by: sprash | last post by:
Newbie question: I'm trying to determine if a file physically exists regardless of the permissions on it Using File.Exists() returns false if it physically exists but the process does not have the necessary permissions. One hack could be to check for length and that would throw a FileNotFoundException ...but there is got to be a better way!
2
12610
ADezii
by: ADezii | last post by:
Many times when writing VBA code, we find the need to work with Files in one form or another. Whatever the process may be, we need to be sure that a File is present in a specified location. One Method to guarantee that a File does in fact exist, is to pass the Absolute Path to the File to a Function which will investigate the Path and return a Boolean Value (True/False) indicating whether or not the File exists. The following code segments will...
5
4576
by: chris_peoples | last post by:
I have a virtual directory, lets say it exists at www.server-a.com/virtual-dir/ virtual-dir points to another directory on another server using the unc path: \\server-b\main-dir I have a file at www.server-a.com/virtual-dir/some_script.asp, using the following include: <!--#include file="some_include.asp"---> Going to www.server-a.com/virtual-dir/some_script.asp works perfectly fine
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.