MSVC 2019 Compiler Warnings

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

MSVC 2019 Compiler Warnings

Post by jeffw »

Hello,

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
{
CS_OBJECT(FileSelectionWidget)
...
}

Where can I find this defined in the source?

Thanks,
Jeff

PS: Thanks for CopperSpice!
barbara
Posts: 447
Joined: Sat Apr 04 2015 2:32 am
Contact:

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.

Barbara
Post Reply