Error compiling standard libaries: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 29: Line 29:




[[Category:STRIDE Troubleshooting]]
[[Category:Troubleshooting]]
[[Category:STRIDE Compiler]]
[[Category:STRIDE Compiler]]

Revision as of 07:05, 23 October 2009

Because the STRIDE C/C++ compiler (s2scompile) is a program analysis and instrumentation tool, it does not include its own copy of the standard C and C++ library header files. Rather, the recommended use is to configure the STRIDE compiler to use the same header files as the target compilation system. Normally this works fine without adjustment. However, from time to time the target compiler may have certain macros specially predefined that require adjustment within STRIDE.

If you encounter syntax errors when compiling the systems standard library header files, the issue is typically that one or more macros is built into the target compiler and the STRIDE environment needs to be adjusted to also include the macro. Typically this requires the user to put one or more defines (-D options) on the STRIDE compiler commandline.

As an example, in one case, compilation of the local stdlib.h file yielded the following error message:

 "C:/Apps/QDSP6/release_1.0.00/tools/dinkumware/include/common/stdlib.h", line
 161: error: linkage specification is incompatible with previous "atexit"
 (declared at line 151)

Examination of the stdlib.h file and included filed contents revealed that the following macro definition needed to be added to the STRIDE compile commandline.

 -D_HAS_STRICT_LINKAGE=0