[Qt-creator] error with position independent code : qt 5.x

Kapil Gupta kpgupta98 at gmail.com
Fri Sep 16 16:28:14 CEST 2016


Hi,

I am having this error with qt code :
```
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:37:0,
                 from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:41,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:40,
                 from
/usr/include/x86_64-linux-gnu/qt5/QtMultimedia/qaudioformat.h:38,
                 from
/home/cortana/libdash/libdash/qtplayer/libdashframework/Buffer/AudioChunk.h:16,
                 from
/home/cortana/libdash/libdash/qtplayer/libdashframework/Buffer/AudioChunk.cpp:12:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067:4: error: #error
"You must build your code with position independent code if Qt was built
with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not
enough)."
 #  error "You must build your code with position independent code if Qt
was built with -reduce-relocations. "\
    ^
[ 57%] Building CXX object
CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/MediaObjectBuffer.cpp.o
[ 60%] Building CXX object
CMakeFiles/qtsampleplayer.dir/libdashframework/Input/DASHReceiver.cpp.o
[ 63%] Building CXX object
CMakeFiles/qtsampleplayer.dir/libdashframework/Input/MediaObject.cpp.o
[ 66%] Building CXX object
CMakeFiles/qtsampleplayer.dir/libdashframework/Input/DASHManager.cpp.o
CMakeFiles/qtsampleplayer.dir/build.make:389: recipe for target
'CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/AudioChunk.cpp.o'
failed
make[2]: ***
[CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/AudioChunk.cpp.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:37:0,
                 from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:41,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:40,
                 from
/usr/include/x86_64-linux-gnu/qt5/QtMultimedia/qaudioformat.h:38,
                 from
/home/cortana/libdash/libdash/qtplayer/libdashframework/Input/DASHManager.h:23,
                 from
/home/cortana/libdash/libdash/qtplayer/libdashframework/Input/DASHManager.cpp:12:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067:4: error: #error
"You must build your code with position independent code if Qt was built
with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not
enough)."
 #  error "You must build your code with position independent code if Qt
was built with -reduce-relocations. "\
```
What can I do to remove this error? The code is the libdash library's
qtsampleplayer which is based on cmake.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160916/f4ceb075/attachment.html>


More information about the Qt-creator mailing list