User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 427,122 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,085 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 7449 | Replies: 1
Reply
Join Date: Sep 2006
Posts: 1
Reputation: analeah is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
analeah analeah is offline Offline
Newbie Poster

"Cannot Open Include File" MS Visual C++ error

  #1  
Sep 1st, 2006
Hi,

I just installed the latest version of Visual C++ from Microsoft on a windows XP system. I have used this program before, but this time, on my new install, when I try to compile, I'm getting an error, "c:\documents and settings\user\desktop\r\listdbl.cpp(1) : fatal error C1083: Cannot open include file: 'listdbl.h': No such file or directory"

What I'm trying to do:
I have a project I'm working on that has a header file "listdbl.h" and two source files that call it, "listdbl.cpp" and a driver. All files are in the same directory:
"c:\documents and settings\user\desktop\r". To start, I opened a new project and added these files. When I tried to compile "listdbl.cpp" I got that error.

What I have tried:
I have tried following the help file on "additional include directories" thinking that this is my problem (and it still may be). For the line to include a file the help says:

"The following command looks for the include files requested by MAIN.c in the following order: first in the directory containing MAIN.c, then in the \INCLUDE directory, then in the \MY\INCLUDE directory, and finally in the directories assigned to the INCLUDE environment variable.

Copy Code
CL /I \INCLUDE /I\MY\INCLUDE MAIN.C"

I tried, "CL /I \INCLUDE /I\C:\Documents and Settings\User\Desktop\Include"

And I'm still getting the same error. Any ideas? Any help is greatly appreciated!

Thank you,
-Leia Chancellor

AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,639
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 22
Solved Threads: 418
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: "Cannot Open Include File" MS Visual C++ error

  #2  
Sep 1st, 2006
If they're all in the same directory, then
#include "listdbl.h"
Then it should find that header file just fine.

If you have
#include <listdbl.h>
Then you need to specify a search path.

From the command line, you might try
CL /I. prog.c
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 6:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC