Hi Nico, Can you provide more explanation on below? I have't touched C/C++ for quite some time and I really forgot what extern "C" is for. I included it here only because it's also in gssapi.h and I thought I should make the declaration and implementation consistent.
The getenv line compiles fine, and I am using VS2017. And I don't intend to make this C. So what's the formal way to do all these? Thanks, Max > On Dec 12, 2018, at 8:40 AM, Nico Williams <nico.willi...@twosigma.com> wrote: > > --->#ifdef __cplusplus > extern "C" { > #endif /* __cplusplus */ > > The file extension is .cpp. > > // When KRB5_TRACE is set, debug info goes to stdout. The value is ignored. > --->char* trace = getenv("KRB5_TRACE"); > > Global variable initialization with non-const expressions is C++ but > not valid C. This is inside the extern "C" block. How does this > build? > > If you want this to be C, make the file extension .c and make sure it > builds with a C compiler.