Using VPF on Android
I'm trying to use "-mfloat-abi=hard" option of compiler for using VPF on Android. So I made a standard widget-based project and added to project file this option. I got these linker errors:
error: main.o uses VFP register arguments, output does not
error: mainwindow.o uses VFP register arguments, output does not
error: moc_mainwindow.o uses VFP register arguments, output does not
collect2: error: ld returned 1 exit status
My project file:
@QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = test_VPF
TEMPLATE = app
QMAKE_CXXFLAGS += -mfloat-abi=hard
SOURCES += main.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY = @
Using: Qt 5.2.0; Compiler: armeabi_v7a; Ubuntu 13.10
AFAIK, Qt is built for softfp, so you would need to build Qt yourself first modifying the android mkspec
I have similar issue, when I tried to add a library, built for my android device, is included in my project. I get error "aaa.so uses VFP register arguments, output does not".
So I need to build Qt for hardfp.
I found qmake.conf in the path C:\Qt\Qt5.5.1\5.5\Src\qtbase\mkspecs\android-g++, but not sure what to specify to make it hardfp.
Refering to Build Qt5.5 for Beaglebone I found to comment some part in COMPILER_FLAGS. But same is not found in android mkspec.
Could you help to know what should I change to build it for hardfp.
Thanks in advance :)
AFAIK, you need to change
hard. Note that I don't have tested it.
@SGaist Thanks... I will update if it starts working...