Page 1 of 1

Adding include folder to textpad

Posted: Sat Mar 14, 2009 5:21 pm
by NasaGuru
Hey! I want to add a folder of includes to textpad. How to I do this so I can use the includes?

Re: Adding include folder to textpad

Posted: Mon Mar 16, 2009 10:58 pm
by shaqmeister
NasaGuru wrote:Hey! I want to add a folder of includes to textpad. How to I do this so I can use the includes?
Hi there

You haven't said what version of TextPad you are using, but assuming the most recent (or at least TextPad 5.*), what you need is to set up an appropriate include environment variable for your compiler under Configure | Preferences | Environment Variables.

Again, you haven't mentioned what compiler the includes are required for, so you'll need to check the documentation to see what exactly should be set. As an example, to use the Visual C++ compiler in TextPad, you would need to have the full include path (including your own includes) set somewhere using:

Code: Select all

INCLUDE="C:\MyIncludes;C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include"
Now, if you are using your compiler successfully otherwise but only need to add your includes, then the default include path must be set somewhere, most likely in the system or user environment variables. So, as an example, if the default include path is, as it often is, set using 'INCLUDE', and it IS already set for your environment, then you can use TextPad's environment setting to append your own include directories, using:

Code: Select all

INCLUDE="C:\MyIncludes;%INCLUDE%"