Tausif
Tausif

Reputation: 127

VS2022 with LLVM Clang failing to compile static Cpp lib

I am trying to upgrade my static lib project from VS 2017 to VS 2022 also wanted to use LLVM clang support. In my project I have only one class.

class MyClass
{
private: 
    int count;
    static int data;
public:
    MyClass();
    virtual ~MyClass();
};

Project builds successfully with VS 2017 & VS 2022, but moment I change it to "LLVM (clang-cl)", I am getting error "Error MSB6006 "llvm-lib.exe" exited with code 1".

After looking at the post "https://developercommunity.visualstudio.com/t/clang-cl-msbuild-integration-fails-for-c-static-li/1218106" I changed LTCG to "No", even then problem exists.

Please guide.

With Regards.

TausifAhamad.

Upvotes: 0

Views: 558

Answers (0)

Related Questions