Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MSVC: Static gflags library doesn't work #211

@KindDragon

Description

@KindDragon
Benchmark.h
DECLARE_bool(benchmark);

Benchmark.cpp
DEFINE_bool(benchmark, false, "Run benchmarks.");

Benchmark.cpp(35): error C2370: 'gflags::FLAGS_benchmark': redefinition; different storage class
Benchmark.h(34): note: see declaration of 'gflags::FLAGS_benchmark'

Because DEFINE_VARIABLE always add GFLAGS_DLL_DEFINE_FLAG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions