本文介绍了致命错误:QObject:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android Studio开发了一个android应用程序,现在我想包含一个本机部分.因此,我开始使用Qt开发此部分,现在我想在应用程序中包含源文件.

I developed an android application using Android studio and now I would like to include a native part. So I start developing this part using Qt and now I would like to include sources files in my application.

我的问题是出现以下错误:致命错误:QObject:没有这样的文件或目录

My problem is I get the following errors : fatal error: QObject: No such file or directory

注意:我使用的是:android-ndk-r10e,我的Android.mk文件如下:

Notice : I use the : android-ndk-r10e and my Android.mk file looks like :

LOCAL_PATH := $(call my-dir)
LOCAL_MODULE := qt-signaux

LOCAL_SRC_FILES += com_example_qtsignaux_Library.cpp
LOCAL_SRC_FILES += Emitter.cpp #class using qtcreator and containing QObject

TARGET_ARCH_ABI += armeabi
LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)

先谢谢大家

推荐答案

我终于找到了我的问题.我的include路径没有指向大文件夹(包含QObject标头的那个文件夹)

I finally found my issue. My include path did not point to the great folder (the one containing the QObject header)

要修复此问题,我在ndk-build命令中使用了包含路径标志

To fix it I used the include path flag with the ndk-build command

这篇关于致命错误:QObject:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 14:09
查看更多