multiple includes
Page 1 of 1

Author:  Spiked3 [ Sat Oct 13, 2012 7:00 pm ]
Post subject:  multiple includes

I'm sure there is probably a work around/alternative but i was just hoping

is it possible to allow separation of library paths for the includes? I'm sure most of us use Xander's lib, but I would also like to have my own common library as well. being able to specify both, semi-colon delimited or similar, would be helpful.

as it is now (3.512 pre) there is a user 'include' file for platform, as well as a user include files (common) - so I guess i can use both of those for this, however, just semi separated single entry is more in line with what I'm used to, and to me, more logical.

Author:  Dick Swan [ Mon Oct 15, 2012 3:45 pm ]
Post subject:  Re: multiple includes

You can always used something like
#include "./Directory/Filename.h"

where "Directory" is a folder in the same folder that your source file is located.

"../" (up one directory) and "./" are alsoerecognized in the file path for relative file references. Multiple folders can be specified in the name -- "./directory/subdirectory/filename"

You can also specify non-relative (i.e. absolute file names) with
#include "C:/folderName/filename.h"

Author:  Spiked3 [ Mon Oct 15, 2012 4:51 pm ]
Post subject:  Re: multiple includes

I see what you are saying.

In my case I keep other peoples code very separate from mine, for VCS reasons. I could still move directories around to make this usable (it wouldnt by any chance support environment variables would it? I have not checked), but like I said, was just hoping a change to the compiler so that I could make a single change to a setting in the IDE was easy enough (and more in line with ANSI C :wink: ) as compared to changing/managing include lines in many programs. Maybe at some later point, it is not creating any problems at the moment.

Author:  MHTS [ Thu Oct 25, 2012 5:38 pm ]
Post subject:  Re: multiple includes

I agree. I would like this feature as well. Since there are different versions of RobotC, different versions of Xander's Driver Suite as well as different versions of our FTC library, I found myself having all these in different folders to test the code. It would be nice to be able to switch the "include path" to point to different versions of the library instead of going into code and change the path of each include. Or worst yet, duplicate the library in another folder so that it is at a fixed relative path (e.g. ..\MyLib). Well, nice to have but not high priority.

Author:  mightor [ Fri Oct 26, 2012 1:03 am ]
Post subject:  Re: multiple includes

I have an internal build that seems to support multiple include directories :)

Let the rejoicing begin!

- Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group