출력 파일에서 전체 경로 피하기

기술노트 59374

아키텍처:

All

컴포넌트:

general

업데이트:

2018-02-28 오전 2:29

Introduction

The output file contain full paths to source files. This is not wanted behaviour.

Comments

The typical reason for this problem is that the application uses the assert macro which in turn uses the macro __FILE__ which expands to the full path of the current file.

Suggestions

  • Avoid Assert - By using conditional compilation, assert-messages can be avoided.
    The file "\arm\inc\c\assert.h" uses this construction to avoid assert-messages to be built into the output file/image:
  •  #ifdef NDEBUG
    #define assert(test) ((void)0)
  • Exclude path in macros - This can be done by using the command line option :
    --no_path_in_file_macros
    Add it to "Project > Options > C/C++ Compiler > Extra Options".


All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.