Skip to content

Cannot compile with clang #21

@techbech

Description

@techbech

Building with clang fails because of the naming collision between the namespace dotenv and the class dotenv.

Version

clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Some of the build errors

***/cpp-dotenv/src/dotenv.cpp:14:1: error: reference to 'dotenv' is ambiguous
dotenv::dotenv& dotenv::dotenv::load_dotenv(const string& dotenv_path, const bool overwrite, const bool interpolate)
^
***cpp-dotenv/src/Parser.h:13:11: note: candidate found by name lookup is 'dotenv'
namespace dotenv
          ^
***/cpp-dotenv/include/dotenv.h:9:11: note: candidate found by name lookup is 'dotenv::dotenv'
    class dotenv
          ^
***/cpp-dotenv/src/dotenv.cpp:14:17: error: reference to 'dotenv' is ambiguous
dotenv::dotenv& dotenv::dotenv::load_dotenv(const string& dotenv_path, const bool overwrite, const bool interpolate)
                ^

Solution could be to rename the dotenv class #22

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdifficulty: VERY LOWTask with very low difficultypriority: HIGHTask with high priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions