我是一名有帮助的助手,可以为您进行文本翻译。
由于某些需求的变更,我需要对一个 C 动态库进行一些重构。
以下代码在一个 C 文件中:
__attribute__((noinline))
static void *find_document(...)
{
...
}
bool docuemnt_found(const char *name) {
...
find_document(...);
...
}
我将docuemnt_found()函数分离到不同的cpp文件中。现在docuemnt_found()函数无法链接到find_document()方法?
我尝试为c文件创建头文件,然后使用extern "C"
包含头文件,但它没有起作用。
我想保持find_document()内联。这里有什么遗漏或者有什么问题吗?
static
的含义,然后删除该单词。 - Kerrek SB