Page 1 of 1

Bricxcc include paths: current dir (variable) and a static?

Posted: 28 Nov 2010, 10:51
by HaWe
how can I set 2 include paths in Bricxcc:

1st, always search in the current .nxc program directory where the main file is (if include file found, ingnore the rest),
e.g. G:\Akten\Programmierung\NXC\test or G:\Akten\Programmierung\NXC\project or G:\Akten\Programmierung\NXC\chess

2nd, if not in current dir: look at a static include directory,
e.g. like G:\Akten\Programmierung\NXC\include

:?:

Re: Bricxcc include paths: current dir (variable) and a static?

Posted: 29 Nov 2010, 21:36
by afanofosc
I am not sure I understand the question, since afaik, what you describe is how the compiler is supposed to work wrt include paths. It should always check the same directory as the file being compiled first and then any of the specified additional include paths. You can use a semi-colon separated list of paths. In theory, "." should work for "original source code path" but I am not 100% certain about that. BricxCC saves the file you want to compile to the %TEMP% folder and it is not impossible that this is causing include file path problems in some cases. I have not personally ever had a problem with including a file that is in the same directory as the original source code, however.

John Hansen

Re: Bricxcc include paths: current dir (variable) and a static?

Posted: 29 Nov 2010, 22:58
by HaWe
what I tried was:
having a file "nxcio.h" in the "...\include folder". It worked.
having a file "nxcio.h" in the "." folder but NOT in the "...\include" folder: It worked NOT, file was not found - But "." wasn't additionally specified as an include path
(I tried
.
it was not accepted
but didn't try
"."
(included in colons? or quotes? - or how is it called?)
)

What will the compiler do if in "." is such a file as well as in "...\include" ? which one will he take?
(do you say "he" or "it" related to "the compiler"?)