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
Bricxcc include paths: current dir (variable) and a static?
Re: Bricxcc include paths: current dir (variable) and a static?
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
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: Bricxcc include paths: current dir (variable) and a static?
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"?)
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"?)
Who is online
Users browsing this forum: Semrush [Bot] and 4 guests