-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler error when using an #include "..." on the first line of an .azsl file #39
Comments
Azslc is not supposed to accept preprocessor directives. So this report probably needs to be moved toward the repository where the builders are. Just tested mcpp alone, and seems to be working: If issue there indeed is, it has to be related to some treatment in the builders, like include list processing: |
I've stumbled onto the same, if not similar, issue. My issue occurs with #include with angle brackets as well. My example below is using the shader code given in this tutorial: https://www.o3de.org/docs/learning-guide/tutorials/rendering/get-started-materialtypes-and-shaders/ When no empty line is present at the top of the .azsl file such as: The following error is generated as though the "#include <viewsrg.srgi>" was not present: However, when an empty line is placed at the top of the .azsl file as such: No errors are generated in the Asset Processor by the Asset Builder. |
I ran into this recently too, also with angle brackets. Moving it to the second line resolved the issue. |
@galibzon We might want to consider prioritizing this fix for the upcoming release. |
@galibzon if you want to work on this for the upcoming release, we will need to do one of two things to make sure we track it properly either (A) move this issue into the main repo and assign it to the "Release/2210" milestone. OR (B) create a "Release/2210" milestone here in this repo and alert @AMZN-Dk and I that this milestone exists in this depot. We are ok with either option. Thanks |
AZSLc returns an error when the first line of an .azsl file contains an
#include "..."
. It works well if it begins in the second line, or if the include has an#include <...>
format.To quickly reproduce, move the first
#include "Skin_Common.azsli"
fromSkin.azsl
to the first line (above the copyright notice).The text was updated successfully, but these errors were encountered: