adding include path
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 17, 2016 1:35 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
adding include path
Hello, I am trying to add a file that has a bunch of .h files inside, so I went to the project settings --> compiler tab --> Include Paths. I then put the C:\"path to .h files".
When I try to #include any from the list, it doesn't acknowledge that there is a directory or file called that. I am using TDM-GCC-32. any help would be much appreciated!
Thanks,
lane
When I try to #include any from the list, it doesn't acknowledge that there is a directory or file called that. I am using TDM-GCC-32. any help would be much appreciated!
Thanks,
lane
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Please read the "HOW TO POST" thread (see my signature)
and provide more information
Eran
and provide more information
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 17, 2016 1:35 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Sorry about that!
Codelite 9.1.0
Windows 10
TDM-GCC-32 version 5.1.0
Build Problem: specifically includes
Codelite 9.1.0
Windows 10
TDM-GCC-32 version 5.1.0
Build Problem: specifically includes
Code: Select all
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-32/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ New - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Projects/New'
mingw32-make.exe[1]: Leaving directory 'C:/Projects/New'
mingw32-make.exe[1]: Entering directory 'C:/Projects/New'
C:/TDM-GCC-32/bin/g++.exe -c "C:/Projects/New/main.cpp" -g -O0 -Wall -o ./Debug/main.cpp.o -IC:/ox -I. -IC:/ox
C:/Projects/New/main.cpp:1:21: fatal error: Polygon.h: No such file or directory
compilation terminated.
mingw32-make.exe[1]: *** [Debug/main.cpp.o] Error 1
New.mk:97: recipe for target 'Debug/main.cpp.o' failed
mingw32-make.exe[1]: Leaving directory 'C:/Projects/New'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====2 errors, 0 warnings====
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Is the file Polygon.h exists under C:/ox ?
How did you include it in your code?
Note that this is not a CodeLite related issue, its basic C/C++
Eran
How did you include it in your code?
Note that this is not a CodeLite related issue, its basic C/C++
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 17, 2016 1:35 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Yes! Polygon.h is inside C:/ox .eranif wrote:Is the file Polygon.h exists under C:/ox ?
How did you include it in your code?
my code for including the file is:
Code: Select all
#include "Polygon.h"
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Can you print the content of the directory C:\ox ?
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 17, 2016 1:35 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
I don't think that I can..There are many Header files inside. When I go to their properties they are .hpp files. Then, when I tried to include it I tried:
That yielded me with an error that says:
It also opened up Polygon.hpp , but all that was in there was #include "Polygon.h" .
This may just be a general c++ problem, as you said Eran. If you know of any resources that could teach me about using header files that I did not make, I think it will be a bit more productive.
lane
Code: Select all
#include "Polygon.hpp"
Code: Select all
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-32/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ New - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Projects/New'
mingw32-make.exe[1]: Leaving directory 'C:/Projects/New'
mingw32-make.exe[1]: Entering directory 'C:/Projects/New'
C:/TDM-GCC-32/bin/g++.exe -c "C:/Projects/New/main.cpp" -g -O0 -Wall -o ./Debug/main.cpp.o -IC:/ox -I. -IC:/ox
In file included from C:/Projects/New/main.cpp:6:0:
C:/ox/Polygon.hpp:1:21: fatal error: Polygon.h: No such file or directory
compilation terminated.
mingw32-make.exe[1]: *** [Debug/main.cpp.o] Error 1
New.mk:97: recipe for target 'Debug/main.cpp.o' failed
mingw32-make.exe[1]: Leaving directory 'C:/Projects/New'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====2 errors, 1 warnings====
This may just be a general c++ problem, as you said Eran. If you know of any resources that could teach me about using header files that I did not make, I think it will be a bit more productive.
lane
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
The compiler *finds* Plolygon.hpp but it can not find included from within this file "Polygon.h"C:/ox/Polygon.hpp:1:21: fatal error: Polygon.h: No such file or directory
Does this file exist under c:\ox ?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 17, 2016 1:35 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
I'm not understanding:
lane
When you say that, do you mean, go to C:/ox and look if there is a header file called Polygon? If so, yes. I go to C:/ox and find Polygon.Does this file exist under c:\ox ?
lane
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: adding include path
Do you find Polygon.h or Polygon.hpp or both?
Eran
Eran
Make sure you have read the HOW TO POST thread