Skip to content

Build failed on x64 #23

Description

@caxapexac

Library is making an assumtions that sizeof(size_t) == sizeof(unsigned int) (i.e. SPK_Group::373) which isn't true on x64 (sizeof(size_t) == 8)

Fixed by adding
TYPE_SIZE_T,
into SPK_Types::61
and
spk_basetype( size_t, TYPE_SIZE_T, meta::PassByValue );
into SPK_Types::308

But its still won't build because of some kind of error in SPK::meta::Counter (its using sizeof inside contrution of type system so Im almost sure this is the root of the problem). Anybody came with the soultion?

Error sample:
spk_attribute(bool, loop, enableLooping, isLoopingEnabled); (SPK_GraphInterpolator::244)

error: redefinition of 'spkAttr<((sizeof (_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>'
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SPK_GraphInterpolator.h:422:20: note: previous definition is here
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^
SPK_GraphInterpolator.h:464:119: error: class member cannot be redeclared
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
                                                                                                                      ^
SPK_GraphInterpolator.h:427:119: note: previous declaration is here
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions