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 know that. The point is that Zig compiler seems don't 
respect the`-D main=nsh_main`  option.  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 source should 
have "main()" defined by default, however, you can see that original Zig sample 
doesn't have "main()", 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to