MSVC 2019 Compiler Warnings

Discuss issues related to installing or building
Post Reply
Posts: 5
Joined: Sun Jan 01 2023 6:52 pm

MSVC 2019 Compiler Warnings

Post by jeffw »


When compiling Copperspice 1.8.1 on Windows 11 with MSVC 2022 (compiling 2019 project) I get the following error related to CS_OBJECT

warning C5030: attribute 'gnu::used' is not recognized

class FileSelectionWidget : public QWidget

Where can I find this defined in the source?


PS: Thanks for CopperSpice!
Posts: 407
Joined: Sat Apr 04 2015 2:32 am

Re: MSVC 2019 Compiler Warnings

Post by barbara »

MSVC 2022 (compiling 2019 project
1 Are you trying to build CopperSpice with MSVC 2022 and your application with MSVC 2019?

2 As a side note, MSVC needs everything built in either debug or release. Mixing the two does not always work as expected.
warning C5030: attribute 'gnu::used' is not recognized
3 Compilers are required to ignore attributes they do not recognize or handle. We are not seeing any warnings about this attribute in our CI testing on MSVC. Can you let us know which options you have turned on when building CS and if this shows up in both versions of MSVC you are using.

Post Reply