Skip to content

Build failed with c code #1083

@star-hengxing

Description

@star-hengxing

Describe the bug

include/rime_api.h(253): error C2059: syntax error: 'string'
include/rime_api.h(254): error C2059: syntax error: 'string'
include/rime_api.h(514): error C2059: syntax error: 'string'
error C2065: 'rime_get_api': undeclared identifier

To Reproduce

#define RIME_IMPORTS
#include <rime_api.h>

int main()
{
    void* f = rime_get_api;
}

Expected behavior
Remove extern "C"

librime/src/rime_api.h

Lines 21 to 26 in 2930c26

#define RIME_DLL __declspec(dllexport)
#define RIME_API extern "C" RIME_DLL
#elif defined(RIME_IMPORTS)
/* DLL import */
#define RIME_DLL __declspec(dllimport)
#define RIME_API extern "C" RIME_DLL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions