Menu

#1285 C::B build fails when building with Windows MSYS2 Clang64 compiler

Undefined
open
nobody
None
Bug_Report
2022-07-21
2022-07-21
No

I get four (4) build errors when building the C::B source with the MSYS2 Clang64 compiler.

The errors are:

ccmanager.cpp|107|error: explicit specialization of 'instance' after instantiation|
include\manager.h|210|note: implicit instantiation first required here|
ccmanager.cpp|108|error: explicit specialization of 'isShutdown' after instantiation|
include\manager.h|211|note: implicit instantiation first required here|


cbcolourmanager.cpp|15|error: explicit specialization of 'instance' after instantiation|
include\manager.h|210|note: implicit instantiation first required here|
cbcolourmanager.cpp|16|error: explicit specialization of 'isShutdown' after instantiation|
include\manager.h|211|note: implicit instantiation first required here|

The ccmanager.cpp code is:

    template<> CCManager* Mgr<CCManager>::instance = nullptr;
    template<> bool Mgr<CCManager>::isShutdown = false;

The cbcolourmanager.cpp code is:

    template<> ColourManager* Mgr<ColourManager>::instance = nullptr;
    template<> bool  Mgr<ColourManager>::isShutdown = false;

There are various ways to resolve this and as such I will leave this for a more experienced CB dev to resolve so that the solution is suitable.

These errors do not occur on the MAC.

Windows clang version 14.0.4.
MacOS Apple clang version 13.0.0 (clang-1300.0.29.30).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.