Skip to content

Build Error: 'MicroProfileSymInit' and 'MicroProfileSymCleanup' identifier not found #92

@claydonkey

Description

@claydonkey

Build Error: 'MicroProfileSymInit' and 'MicroProfileSymCleanup' identifier not found

Environment:

  • Visual Studio
  • C++14

Error:
error C3861: 'MicroProfileSymInit': identifier not found error C3861: 'MicroProfileSymCleanup': identifier not found

Analysis:
These errors occur because the functions MicroProfileSymInit and MicroProfileSymCleanup are called before they are defined in microprofile.cpp. In C++, a function must be declared before it is used.

Suggested Fix:
Add forward declarations for these functions near the top of microprofile.cpp, after the typedefs and before any code that calls them. For example:
typedef uint64_t MicroProfileLogEntry; void MicroProfileSymCleanup(); // Forward declaration bool MicroProfileSymInit(); // Forward declaration void MicroProfileSleep(uint32_t nMs);
template T MicroProfileMin(T a, T b);

Summary:
Declaring these functions before their first use will resolve the C3861 errors related to missing identifiers.

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