相关疑难解决方法(0)

Android NDK:函数va_start/va_end无法解析

我试图在我的项目中使用va_start和va_end函数,但是eclipse不想将其解析为函数.gcc编译整个项目没有错误......

[MYFILE.CPP]

#include <stdio.h>
#include <stdarg.h>
[...]
inline void ShowDbgMsg( const char* str, ... )
{
    va_list argptr;
    va_start(argptr, str);
    vprintf(str, argptr);
    va_end(argptr);
}
[...]
Run Code Online (Sandbox Code Playgroud)

[Android.mk]

[...]
LOCAL_C_INCLUDES := jni/pvrTools/ jni/igel/ $(STLPORT_BASE)/stlport
[...]
Run Code Online (Sandbox Code Playgroud)

Eclipse说:

[...]
Description Resource    Path    Location    Type
Function 'va_start' could not be resolved   igel.comdef.h   /NativeProject/jni/igel    line 195 Semantic Error
Function 'va_end' could not be resolved igel.comdef.h   /NativeProject/jni/igel  line 203   Semantic Error
Function 'va_start' could not be resolved   igel.string.h   /NativeProject/jni/igel line 341    Semantic Error
Function 'va_end' could not …
Run Code Online (Sandbox Code Playgroud)

android android-ndk

4
推荐指数
1
解决办法
3742
查看次数

标签 统计

android ×1

android-ndk ×1