Fix compilation issues

This commit is contained in:
Thiago Alves
2025-10-22 09:58:45 -04:00
committed by GitHub
parent 7ea8d717c5
commit ec3a29f28c
2 changed files with 7 additions and 0 deletions

View File

@@ -1886,6 +1886,7 @@ __end:
#include "communication.h"
#include "../c_blocks.h"
#if defined(SEQUENT)
#include "sm_cards.h"
#endif

View File

@@ -129,6 +129,12 @@ class runtime:
for line in combined_lines:
if line.startswith('(*DBG:') and line.endswith('*)'):
c_debug_lines.append(line[6:-2])
elif line.startswith('(*FILE:c_blocks_code.cpp') and 'extern "C" void' in line:
# This is a hack to backport runtime v4 C/C++ functionality to v3. The v3 runtime needs to
# exclude all extern "C" declarations from the c_blocks_code.cpp file. I know this is not
# pretty, but v3 architecture is not pretty, so we are doing this here so that v4 code
# can remain pretty.
pass
elif line.startswith('(*FILE:') and line.endswith('*)'):
file_content = line[7:-2].strip()
if ' ' in file_content: