Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
#include "puzzle.h"
#include "cursesGui.h"
these 2 lines are making trouble in my program while compiling.
the error message is "unable to open file include 'puzzle.h' and 'cursesgui.h'
what could be the reason of this error message? and its solution?
Posted

Once again: look at the error messages. The compiler is telling you that it cannot open these files which probably means one of:

  • The names are not spelled correctly.
  • The files are not in the same file as the source code.
  • They are not in any of the directories specified by the INCLUDE path.

Find where these files are located and make sure you provide that path to the compiler or build system.
 
Share this answer
 
Comments
Sidra Feroze 21-Oct-12 7:26am    
yeah. I saw in the INCLUDE folder and others but could not find these files. what should I do now ? :( any alternative file? which works same as it does?
Richard MacCutchan 21-Oct-12 7:33am    
I already told you what to do: find out where these files are and link them in to your build system as required. If you do not have these files on your system then I can only wonder why you are trying to include them in your code.
The compiler could not found those files.
Your development environment are ? Windows ? Linux ? Other ?
What are those libraries supposed to do ?
Give more info please.
 
Share this answer
 
Comments
Sidra Feroze 21-Oct-12 7:12am    
it's wnidows ... and I want to make a puzzle game and I am not understanding what these files are used for.
Sidra Feroze 21-Oct-12 7:48am    
ok . I found it. these files are for linux
If you were using Visual Studio, you need to make sure that these two headers are located in the same directory where your project is located.

Otherwise you need to copy them to the project directory, perhaps you also need to right-click on the directory 'Header Files' in the 'Solutions Explorer' view and choose Add > Existing Item.

Or , espatally if these two headers include other sub-headers, you cloud simply do the flowing: Open your project and go to Tools > Options > Projects and Solutions > VC++ Directories.

Now from the combo box 'Show directories for' choose 'Include files', and add a new line and choose the directory where puzzle.h and cursesGui.h are located and then click OK. Now change '""' to "<>" so they become:

C++
#include <puzzle.h>
#include <cursesGui.h>
 
Share this answer
 
Please check if these two files exists in the program folder.

Other reason could be the directory in not on Path System variable.

What editor are you using ?
 
Share this answer
 
Comments
Sidra Feroze 21-Oct-12 7:19am    
I am using turbo C

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900