Skip to content

Issues building with MinGW and Ninja on Windows #1529

@mtwango

Description

@mtwango

The https://github.com/Sphereserver/Source-X/blob/master/src/common/sphere_library/sobjpool.h needs to #include <atomic> due to

Source-X/src/common/sphere_library/sobjpool.h:359:34: error: field 'm_fallbackObjsCount' has incomplete type 'std::atomic<unsigned int>'
  359 |     mutable std::atomic<index_t> m_fallbackObjsCount;

Another issue is in os_set_thread_name_portable in https://github.com/Sphereserver/Source-X/blob/master/src/sphere/threads.cpp

Source-X/src/sphere/threads.cpp:411:9: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'SetThreadDescription_t' {aka 'long int (*)(void*, const wchar_t*)'} [-Werror=cast-function-type]
  411 |         reinterpret_cast<SetThreadDescription_t>(
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  412 |             GetProcAddress(GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription"));
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions