PDA

View Full Version : Trouble building for android platform(clang ++ no such file or directory error:)



Pratik_Patil
24th March 2021, 14:42
am trying to build an app for Windows and Android platform. Windows build is working fine but when I build it for android it gives the following error

error: no such file or directory: '@build\MyApp\object_script.MyAppBuildPAth\bin\and roid_armeabi-v7a\libMyApp_armeabi-v7a.so.Armeabi-v7a'
clang++: error: no such file or directory:
make: *** [Makefile:111: MyAppBuildPAth\bin\android_armeabi-v7a\libTerracad_armeabi-v7a.so] Error 1

This is my .pro file for the app.

//----------------------------------------------------------------------------------

TEMPLATE=app

android{
TARGET= MyAppName
DESTDIR = $${My_ProjDir}/bin/$${configName}
PRJ_DESTDIR = ""
OBJECTS_DIR = $${PRJ_DESTDIR}build/$$TARGET
MOC_DIR = $${PRJ_DESTDIR}build/$$TARGET
UI_DIR = $${PRJ_DESTDIR}build/$$TARGET

DEFINES += ANDROID
DEFINES += ANDROID_NDK_NATIVE
DEFINES += ANDROID_GOOGLE

}else{
DESTDIR = $${My_ProjDir}/exe/$${configName}
PRJ_DESTDIR = ""
OBJECTS_DIR = $${PRJ_DESTDIR}build/$$TARGET
MOC_DIR = $${PRJ_DESTDIR}build/$$TARGET
UI_DIR = $${PRJ_DESTDIR}build/$$TARGET
}


win32:LIBS += -L$${My_ProjDir}/lib/$${configName}
!win32:LIBS += -L$${My_ProjDir}/bin/$${configName}
!win32:LIBS += -L$${My_ProjDir}/lib/$${configName}

INCLUDEPATH += $${My_ProjDir}/ include directories

HEADERS += some heaader files


SOURCES += some source files

FORMS += some form files

QT+= core gui widgets

# Third party SDK libraries
android{
LIBS += linked almost 25-26 libs in this section
}else{
LIBS += windows specific libraries
}

android: include(C:/Users/10313/AppData/Local/Android/Sdk/android_openssl/openssl.pri)
#end of .pro file
#--------------------------------------------------------------------------------


What am I doing wrong? I am new to Qt framework. Can someone point me towards the right direction. Any kind of help will be highly appreciated.

ChrisW67
26th March 2021, 22:49
am trying to build an app for Windows and Android platform. Windows build is working fine but when I build it for android it gives the following error

error: no such file or directory: '@build\MyApp\object_script.MyAppBuildPAth\bin\and roid_armeabi-v7a\libMyApp_armeabi-v7a.so.Armeabi-v7a'
clang++: error: no such file or directory:
make: *** [Makefile:111: MyAppBuildPAth\bin\android_armeabi-v7a\libTerracad_armeabi-v7a.so] Error 1

...

What am I doing wrong? I am new to Qt framework. Can someone point me towards the right direction. Any kind of help will be highly appreciated.

You are missing a library that looks like something called "Terracad". Is this in the list of libraries (LIBS) you did not include in your posted PRO file? Is it installed?

Did you perhaps mean Terracard?