zouboan commented on code in PR #1407: URL: https://github.com/apache/incubator-nuttx-apps/pull/1407#discussion_r1029355658
########## Application.mk: ########## @@ -191,6 +192,21 @@ else MAINNAME := $(addsuffix _main,$(PROGNAME)) +ifeq ($(CONFIG_WINDOWS_NATIVE),y) +$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT) + $(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main -val $(firstword $(MAINNAME))}) Review Comment: @xiaoxiang781216 because define.bat is different from the define.sh, and usage is also different. this is usage of define.bat: `echo USAGE:%progname% [-h] ^<compiler-path^> [-val ^<^val1^>] [^<def2^> [-val ^<val2^>] [^<def3^> [-val ^<val3^>] ...]] echo Where:" echo ^<compiler-path^> echo The full path to your ccpath echo ^<def1^> ^<def2^> ^<def3^> ... echo A list of pre-preprocesser variable names to be defined. echo [-val ^<val1^>] [-val ^<val2^>] [-val ^<val3^>] ... echo optional values to be assigned to each pre-processor variable. echo If not supplied, the variable will be defined with no explicit value.` without -val, there will fatal error in Windows native build, for example: Dnsh_main become Dnsh Dmain -- 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