error: 'INT32_MAX' was not declared in this scope

后端 未结 7 1320
谎友^
谎友^ 2020-12-03 06:56

I\'m getting the error

error: \'INT32_MAX\' was not declared in this scope

But I have already included

#include 

        
7条回答
  •  误落风尘
    2020-12-03 07:22

    I ran into similar issue while using LLVM 3.7.1 c++ compiler. Got the following error while trying to compile gRPC code as part of building some custom library

    src/core/lib/iomgr/exec_ctx.h:178:12: error: use of undeclared identifier 'INT64_MAX'
    

    The compilation went through after adding -D__STDC_LIMIT_MACROS as one of the options to c++ compiler.

    .../bin/c++ -D__STDC_LIMIT_MACROS -I{LIBRARY_PATHS} testlib.cc -o testlib
    

提交回复
热议问题