Set the include path

Thread Solved
Reply

Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

Set the include path

 
0
  #1
Nov 25th, 2008
Hi

How can I set the include path in C++ using command line

Regards
Karan
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,777
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 113
ithelp's Avatar
ithelp ithelp is online now Online
Posting Virtuoso

Re: Set the include path

 
0
  #2
Nov 25th, 2008
Include path of what ? I guess you need to add it in your makefile.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

Re: Set the include path

 
0
  #3
Nov 25th, 2008
Hi
Let me elaborate it
I have opened a VC++.net project

When I compile the project I am getting an error.

fatal error C1083: Cannot open include file: 'Test/Testnamespaces.h': No such file or directory

Now I have created a folder 'Test' and add a header file 'Testnamespaces.h'.

But still I am getting the same error.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 147
Reputation: Laiq Ahmed will become famous soon enough Laiq Ahmed will become famous soon enough 
Solved Threads: 20
Laiq Ahmed Laiq Ahmed is offline Offline
Junior Poster

Re: Set the include path

 
0
  #4
Nov 25th, 2008
The Question is where you've Created the Test Folder. Place with your code files. it will identify the header file in that folder then.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

Re: Set the include path

 
0
  #5
Nov 25th, 2008
Hi

I have created the folder in the root folder of the project.

Regards
Karan
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 538
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 86
Murtan Murtan is offline Offline
Posting Pro

Re: Set the include path

 
0
  #6
Nov 25th, 2008
If the include line looks like:
  1. #include "Test/Testnamespaces.h"
it should look for the Test directory in the same directory the source file was located in, or in the include path.

If you used:
  1. #include <Test/Testnamespaces.h>
the compiler will not look in the source file's directory first.

Which style of include did you use?

If this doesn't help, the relevant section from your code would be useful as well as the project directory listing to demonstrate where the files are located in relation to each other.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: Set the include path

 
0
  #7
Dec 17th, 2008
how to specify include path when compiling c++ files?
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: Set the include path

 
0
  #8
Dec 17th, 2008
here is a good link on how to set search paths when compiling c++
http://www.network-theory.co.uk/docs...cintro_24.html
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC