Good Morning Ladies and Gentlemen,
I'm trying to compile qt for armv7 on a Beaglebone to crosscompile on windows 7. It compiles without any error and if i use this version with a helloworld project without qt-libs it is working. But If I use i.e QCoreApplication or QByteArray or any Qt-lib i get this error:
C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe -static -static-libgcc -o untitled18 main.obj -LC:/qt-everywhere-opensource-src-5.2.0_27Versuch/qtbase/lib -lQt5Core -lpthread
main.obj: In function `main':
C:\build-untitled18-static-Debug/..\untitled18/main.cpp:5: undefined reference to `QCoreApplication::QCoreApplication(int&, char**, int)'
C:\build-untitled18-static-Debug/..\untitled18/main.cpp:7: undefined reference to `QCoreApplication::exec()'
C:\build-untitled18-static-Debug/..\untitled18/main.cpp:7: undefined reference to `QCoreApplication::~QCoreApplication()'
C:\build-untitled18-static-Debug/..\untitled18/main.cpp:7: undefined reference to `QCoreApplication::~QCoreApplication()'
collect2.exe: error: ld returned 1 exit status
I'm using qt5.2.0 and the compiler from sourcery codebench for armgnu and mingw4.8
May you help me with it?
Thanks
Here are additional infos
PRO-File:
#-------------------------------------------------
#
# Project created by QtCreator 2014-01-13T09:56:09
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = untitled18
CONFIG += console
CONFIG -= app_bundle
CONFIG+=static
TEMPLATE = app
SOURCES += main.cpp
#-------------------------------------------------
#
# Project created by QtCreator 2014-01-13T09:56:09
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = untitled18
CONFIG += console
CONFIG -= app_bundle
CONFIG+=static
TEMPLATE = app
SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode
main.cpp
#include <QCoreApplication>
#include
int main(int argc, char *argv[])
{
return a.exec();
}
#include <QCoreApplication>
#include
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
To copy to clipboard, switch view to plain text mode
QTDIR:
C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase
C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase
To copy to clipboard, switch view to plain text mode
PATH:
C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\bin;C:\Sourcery_standard\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;%QUARTUS_ROOTDIR%\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\Pinnacle\Shared Files\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\CineForm\Tools;C:\Program Files\TortoiseSVN\bin;C:\Program Files\doxygen\bin;ÃSROOT%\tools\pcb\bin;ÃSROOT%\tools\fet\bin;ÃSROOT%\OpenAccess\bin\win32\opt;ÃSROOT%\tools\bin;ÃSROOT%\tools\Capture;ÃSROOT%\tools\PSpice\Library;ÃSROOT%\tools\PSpice;
C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\bin;C:\Sourcery_standard\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;%QUARTUS_ROOTDIR%\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\Pinnacle\Shared Files\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\CineForm\Tools;C:\Program Files\TortoiseSVN\bin;C:\Program Files\doxygen\bin;ÃSROOT%\tools\pcb\bin;ÃSROOT%\tools\fet\bin;ÃSROOT%\OpenAccess\bin\win32\opt;ÃSROOT%\tools\bin;ÃSROOT%\tools\Capture;ÃSROOT%\tools\PSpice\Library;ÃSROOT%\tools\PSpice;
To copy to clipboard, switch view to plain text mode
Configure-Skript:
REM Set up Windows SDK for 64bit
set PATH=C:\Program Files (x86)\Git\bin;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\bin;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\include;C:\Qt_5.2\Tools\mingw48_32\bin;C:\Sourcery_standard\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\gnuwin32\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtrepotools\bin;%PATH%
set QMAKESPEC=win32-g++
cd..
cd..
cd qtcmd
copy qmake.conf "C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\mkspecs\linux-arm-gnueabi-g++"
copy Makefile.win32 "C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\qmake"
cd..
cd qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase
configure -developer-build -opensource -confirm-license -no-c++11 -static -make libs -make tools -nomake examples -no-widgets -no-opengl -no-openvg -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -no-nis -no-iconv -largefile -no-fontconfig -no-warnings-are-errors -qt-zlib -no-icu -no-gif -no-libpng -no-freetype -no-harfbuzz -no-angle -no-incredibuild-xge -no-plugin-manifests -qmake -fully-process -no-rtti -no-strip -no-openssl -no-dbus -no-audio-backend -no-wmf-backend -qml-debug -no-directwrite
mingw32-make
REM Set up Windows SDK for 64bit
set PATH=C:\Program Files (x86)\Git\bin;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\bin;C:\Qt_5.2\Tools\mingw48_32\i686-w64-mingw32\include;C:\Qt_5.2\Tools\mingw48_32\bin;C:\Sourcery_standard\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\gnuwin32\bin;C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtrepotools\bin;%PATH%
set QMAKESPEC=win32-g++
cd..
cd..
cd qtcmd
copy qmake.conf "C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\mkspecs\linux-arm-gnueabi-g++"
copy Makefile.win32 "C:\qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase\qmake"
cd..
cd qt-everywhere-opensource-src-5.2.0_27Versuch\qtbase
configure -developer-build -opensource -confirm-license -no-c++11 -static -make libs -make tools -nomake examples -no-widgets -no-opengl -no-openvg -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -no-nis -no-iconv -largefile -no-fontconfig -no-warnings-are-errors -qt-zlib -no-icu -no-gif -no-libpng -no-freetype -no-harfbuzz -no-angle -no-incredibuild-xge -no-plugin-manifests -qmake -fully-process -no-rtti -no-strip -no-openssl -no-dbus -no-audio-backend -no-wmf-backend -qml-debug -no-directwrite
mingw32-make
To copy to clipboard, switch view to plain text mode
QMAKE.conf
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-gcc.exe
QMAKE_CXX = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
QMAKE_LINK = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
QMAKE_LINK_SHLIB = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
# modifications to linux.conf
QMAKE_AR = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-ar.exe cqs
QMAKE_OBJCOPY = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-objcopy.exe
QMAKE_NM = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-nm.exe -P
QMAKE_STRIP = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-strip.exe
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mthumb -mfloat-abi=softfp
QMAKE_CFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
QMAKE_LIBS_NETWORK = -lws2_32
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
QMAKE_CFLAGS_RELEASE = -Os -momit-leaf-frame-pointer
QMAKE_LFLAGS = -static -static-libgcc
DEFINES += QT_STATIC_BUILD
load(qt_config)
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-gcc.exe
QMAKE_CXX = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
QMAKE_LINK = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
QMAKE_LINK_SHLIB = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-g++.exe
# modifications to linux.conf
QMAKE_AR = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-ar.exe cqs
QMAKE_OBJCOPY = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-objcopy.exe
QMAKE_NM = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-nm.exe -P
QMAKE_STRIP = C:\Sourcery_standard\bin\arm-none-linux-gnueabi-strip.exe
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mthumb -mfloat-abi=softfp
QMAKE_CFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
QMAKE_LIBS_NETWORK = -lws2_32
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
QMAKE_CFLAGS_RELEASE = -Os -momit-leaf-frame-pointer
QMAKE_LFLAGS = -static -static-libgcc
DEFINES += QT_STATIC_BUILD
load(qt_config)
To copy to clipboard, switch view to plain text mode
Bookmarks