Skip to content

Commit 47cd7b2

Browse files
ComerLaterRbb666
authored andcommitted
解决bps/simulator无法在vs2019环境下编译
Signed-off-by: latercomer <[email protected]>
1 parent dd5f4ca commit 47cd7b2

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*.crf
1414
build
1515
Debug
16+
.vs
1617
rtthread
1718
settings
1819
documentation/html

bsp/simulator/template_vs2012.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<WarningLevel>Level3</WarningLevel>
4545
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
4646
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
47+
<LanguageStandard_C>stdc11</LanguageStandard_C>
4748
</ClCompile>
4849
<Link>
4950
<AdditionalDependencies>winmm.lib;Packet.lib;wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>

components/finsh/finsh.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,21 @@ typedef struct msh_cmd_opt
196196
* Declares a static array of command options for a specific command.
197197
* @param command The command associated with these options.
198198
*/
199+
#ifdef _MSC_VER
200+
#define CMD_OPTIONS_STATEMENT(command) static struct msh_cmd_opt command##_msh_options[16];
201+
#else
199202
#define CMD_OPTIONS_STATEMENT(command) static struct msh_cmd_opt command##_msh_options[];
203+
#endif
200204

201205
/**
202206
* Starts the definition of command options for a specific command.
203207
* @param command The command these options are associated with.
204208
*/
209+
#ifdef _MSC_VER
210+
#define CMD_OPTIONS_NODE_START(command) static struct msh_cmd_opt command##_msh_options[16] = {
211+
#else
205212
#define CMD_OPTIONS_NODE_START(command) static struct msh_cmd_opt command##_msh_options[] = {
213+
#endif
206214

207215
/**
208216
* Defines a single command option.

src/scheduler_up.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* 2023-10-17 ChuShicheng Modify the timing of clearing RT_THREAD_STAT_YIELD flag bits
3333
*/
3434

35+
#define __RT_IPC_SOURCE__
3536
#include <rtthread.h>
3637
#include <rthw.h>
3738

0 commit comments

Comments
 (0)