yf13 commented on code in PR #2260: URL: https://github.com/apache/nuttx-apps/pull/2260#discussion_r1460174978
########## examples/hello_zig/Makefile: ########## @@ -22,7 +22,7 @@ include $(APPDIR)/Make.defs # Hello, Zig! Example -MAINSRC = hello_zig_main.zig +MAINSRC = $(if $(CONFIG_BUILD_KERNEL), hello_zig.zig, hello_zig_main.zig) Review Comment: @xiaoxiang781216 I knew that. The point is that Zig compiler seems don't have macros support. If there is way to let Zig compiler accept such options, please teach. Also please note that for that trick to work, the apps main sources should have "main()" defined, however, you can see that original Zig example doesn't have "main()" defined, so the original author might face the same limitations as we are now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org