Skip to content

Compiler Error in CMake project #36

@k2ncore

Description

@k2ncore

Hello I am trying to compile my project with Firebase SDK integrated.

but getting these errors

error: no template named 'function' in namespace 'std' at the following code sections

this is from future_impl.h

#if defined(FIREBASE_USE_STD_FUNCTION) /// Register a callback that will be called when this future's status is set /// to Complete. /// /// If clear_existing_callbacksis true, then the new callback /// will replace any existing callbacks, otherwise it will be added to the /// list of callbacks. /// /// The future's result data will be passed back when the callback is /// called. /// /// @return A handle that can be passed toFutureBase::RemoveCompletion. virtual CompletionCallbackHandle AddCompletionCallbackLambda( FutureHandle handle, std::function<void(const FutureBase&)> callback, bool clear_existing_callbacks) = 0; #endif // defined(FIREBASE_USE_STD_FUNCTION)

and also at every place where std::function is used

I have made sure that we are using CXX STD greater than 11 and also we are including

There are some other errors like

/Users/Developer/MyProject/External/Firebase/iOS/firebase/internal/future_impl.h:303: error: variable has incomplete type 'void' inline void FutureBase::OnCompletion(std::function<void(const FutureBase&)> callback) const ^

Can you please help?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions