Browse Source

[bsp][simulator] 增加_CRT_DECLARE_NONSTDC_NAMES=0全局宏定义,防止vs内置stdc与libc定义冲突,如dev_t等

Meco Man 3 years ago
parent
commit
7d57f6b175
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bsp/simulator/drivers/SConscript

+ 3 - 1
bsp/simulator/drivers/SConscript

@@ -7,6 +7,8 @@ LIBS = []
 LIBPATH = []
 LIBPATH = []
 CPPPATH = [cwd]
 CPPPATH = [cwd]
 
 
+CPPDEFINES = ['_CRT_DECLARE_NONSTDC_NAMES=0'] # avoid to conflict with the inherent STDC in VS
+
 # remove no need file.
 # remove no need file.
 if GetDepend('PKG_USING_GUIENGINE') == False:
 if GetDepend('PKG_USING_GUIENGINE') == False:
     SrcRemove(src, 'sdl_fb.c')
     SrcRemove(src, 'sdl_fb.c')
@@ -30,6 +32,6 @@ if sys.platform[0:5]=="linux": #check whether under linux
     SrcRemove(src, ['module_win32.c', 'dfs_win32.c'])
     SrcRemove(src, ['module_win32.c', 'dfs_win32.c'])
 
 
 group = DefineGroup('Drivers', src, depend = [''],
 group = DefineGroup('Drivers', src, depend = [''],
-                    CPPPATH = CPPPATH, LIBS=LIBS, LIBPATH=LIBPATH)
+                    CPPPATH = CPPPATH, LIBS=LIBS, LIBPATH=LIBPATH, CPPDEFINES = CPPDEFINES)
 
 
 Return('group')
 Return('group')