Hello, how to fix this error? Syntax seems correct, code compiles ok with Borland compiler.
cpptest/ALLIKAS.c:33:1: error: Unmatched '{'. Configuration: 'HARBOUR_STRICT_ANSI_C;HB_MSC_STARTUP;HB_OS_WIN_64;HB_PRAGMA_STARTUP;HB_STATIC_STARTUP;_MSC_VER;LCC;POCC;XCC;RPCNDR_H_VERSION'. [syntaxError]
Taavi
I get this instead:
ALLIKAS.c:54:1: error: There is an unknown macro here somewhere. Configuration is required. If HB_INIT_SYMBOLS_EX_END is a macro then please configure it. [unknownMacro] HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_ALLIKAS, __PRG_SOURCE__, 0x000a ) ^
Maybe looking at the preprocessed output (-E) can help with identifying the issue.
-E
Did You test with GUI or command line?
I get the same error with command line without any switch.
GUI project setup file content below. Anything what can cause syntax error here?
<project version="1"> <builddir>Taavitestfail-cppcheck-build-dir</builddir> <analyze-all-vs-configs>false</analyze-all-vs-configs> <check-headers>true</check-headers> <check-unused-templates>true</check-unused-templates> <inline-suppression>true</inline-suppression> <max-ctu-depth>2</max-ctu-depth> <max-template-recursion>100</max-template-recursion> <includedir> </includedir></project>
Ok, seems there is a problem with compiling switches when processing header files for xharbour preprocessor environment. Will investigate further.
your project file is messed up, this is wrong:
<paths> <check-level-normal> <project-name>Taavitestfail</project-name> <options> <option>--std=c89</option> <option>--suppress=missingIncludeSystem</option> <option>-DHB_OS_WIN_64</option> <option>-DHARBOUR_STRICT_ANSI_C</option> <option>-DFIVEWIN</option> </options> </check-level-normal> </paths>
paths is supposed to contain the paths only, no options.
Latest project file
and run command
"c:\Program files\cppcheck\cppcheck.exe" --project=Taavitestfail.cppcheck --std=c89
chatgpt suggests that something is wrong with HB_INIT_SYMBOLS_BEGIN expansion but have'nt figured out what is missing.
https://chatgpt.com/c/686116b1-d958-8010-9f4e-e57a7513fe0c
Something is wrong with pasting code. I will attach my project file as attachment
Log in to post a comment.
Hello,
how to fix this error? Syntax seems correct, code compiles ok with Borland compiler.
cpptest/ALLIKAS.c:33:1: error: Unmatched '{'. Configuration: 'HARBOUR_STRICT_ANSI_C;HB_MSC_STARTUP;HB_OS_WIN_64;HB_PRAGMA_STARTUP;HB_STATIC_STARTUP;_MSC_VER;LCC;POCC;XCC;RPCNDR_H_VERSION'. [syntaxError]
Taavi
I get this instead:
Maybe looking at the preprocessed output (
-E
) can help with identifying the issue.Did You test with GUI or command line?
I get the same error with command line without any switch.
GUI project setup file content below. Anything what can cause syntax error here?
<project version="1">
<builddir>Taavitestfail-cppcheck-build-dir</builddir>
<analyze-all-vs-configs>false</analyze-all-vs-configs>
<check-headers>true</check-headers>
<check-unused-templates>true</check-unused-templates>
<inline-suppression>true</inline-suppression>
<max-ctu-depth>2</max-ctu-depth>
<max-template-recursion>100</max-template-recursion>
<includedir>
</includedir></project>
<paths>
<check-level-normal>
<project-name>Taavitestfail</project-name>
<options>
<option>--std=c89</option>
<option>--suppress=missingIncludeSystem</option>
<option>-DHB_OS_WIN_64</option>
<option>-DHARBOUR_STRICT_ANSI_C</option>
<option>-DFIVEWIN</option>
</options>
</check-level-normal>
your project file is messed up, this is wrong:
paths is supposed to contain the paths only, no options.
Latest project file
<project version="1">
<builddir>Taavitestfail-cppcheck-build-dir</builddir>
<analyze-all-vs-configs>false</analyze-all-vs-configs>
<check-headers>true</check-headers>
<check-unused-templates>true</check-unused-templates>
<inline-suppression>true</inline-suppression>
<max-ctu-depth>2</max-ctu-depth>
<max-template-recursion>100</max-template-recursion>
<includedir>
</includedir></project>
<paths>
<check-level-normal>
<project-name>Taavitestfail</project-name>
<defines>
<define name="HARBOUR_STRICT_ANSI_C">
<define name="HB_OS_WIN_32">
<define name="HB_PRAGMA_STARTUP">
<define name="HB_STATIC_STARTUP">
</define></define></define></define></defines>
and run command
"c:\Program files\cppcheck\cppcheck.exe" --project=Taavitestfail.cppcheck --std=c89
chatgpt suggests that something is wrong with HB_INIT_SYMBOLS_BEGIN expansion but have'nt figured out what is missing.
https://chatgpt.com/c/686116b1-d958-8010-9f4e-e57a7513fe0c
</check-level-normal>Something is wrong with pasting code. I will attach my project file as attachment