errors in UNDEFINED symbols code

Hello!
When i am define symbol in eclipse-based Vitis, the code that is UNDEFINED is gray colored so it is not meant to be compiled.

However i am getting error in this area:

"fatal error: stld1553_nix.h: No such file or directory"

Why it is giving error in this area?
Your compiler can't find the specified file.
How you specify to the compiler where to look, depends on the compiler.
What compiler are you using?
Also, just because some code appears "gray colored" (disabled) in your text-editor (IDE), e.g. Eclipse, it does not mean that this code is actually disabled from the actual compiler's perspective!

Most text-editor targeted for program code have some, more or less, advanced "syntax highlighting" capabilities. When it comes to C/C++ preprocessor directives, the text-editor will have to make some educated guesses about which macros are defined (or not), in order to decide whether code sections enclosed in #ifdef's is enabled (or not). But only the compiler will have the full picture and know for sure...
Last edited on
Hi

Basically software is doing auto. compiling and linking . the command for compiling is:

aarch64-linux-gnu-g++

i run with Linux btw on xilinx board.

So i need to provide the requested .h file anyway?
If you can not change the code in question, and if that code does #include the file "stld1553_nix.h", then yes, you will have to provide that file for the compilation to succeed ;-)

That is unless the #include directive is guarded by an ifdef or ifndef – in which case you could prevent the #include by (un)defining the respective macro, e.g by passing -DNAME or -UNAME on the command-line.


If, in fact, you can change the code, then you can simply remove the #include, if you want... 🙃
Last edited on
Topic archived. No new replies allowed.