Skip to content

Attempting to FFF FreeRTOS.. getting "error: use of deleted function ... " #51

Description

@mhuangwm

Hello,

I am trying to stub out some FreeRTOS API using FFF. At the moment, I am trying to stub out xTimerCreate:

FAKE_VALUE_FUNC(TimerHandle_t, xTimerCreate, const char * const, const TickType_t, const UBaseType_t, void * const, TimerCallbackFunction_t);

However, I am getting a compilation error:

error: use of deleted function 'xTimerCreate_Fake::xTimerCreate_Fake()'
     FAKE_VALUE_FUNC(void *, xTimerCreate, const char * const, const TickType_t, const UBaseType_t, void * const, TimerCallbackFunction_t);

Unfortunately, I cannot change the production code to abstract out FreeRTOS.

Any ideas how I can get around this?

Thanks

Activity

mhuangwm commented on Jun 18, 2018

@mhuangwm
Author

This was the same as #3

I noticed the fix was for C only, so I've compiled the file under C-only and it seems to be compiling that file with no errors.

Out of curiosity, I am wondering why is the fix C-Only? i.e. what limitations of the fix does it not translate to C++ as well?

meekrosoft commented on Jun 22, 2018

@meekrosoft
Owner

Hi William,
Glad for the feedback. I suppose the fix in C-only since that was what was in the pull request. I would be happy to accept a pull request that adds C++ support :-)
Best regards,
Mike

leonardopsantos commented on Jan 14, 2025

@leonardopsantos

While a C++ fix is not forthcoming, there's a possible ugly workaround that I've been using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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