Unsolved Qt Creator boost/gil issues
-
Hi, I am dealing with a strange problem, I am trying to include boost/gil library but when compiling the project i got stangr issues.
.pro file:QT -= gui CONFIG += c++11 console CONFIG -= app_bundle # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += main.cpp
main.cpp:
#include <QCoreApplication> #include <boost/gil/extension/io/jpeg_io.hpp> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); boost::gil::rgb8c_planar_view_t view = boost::gil::planar_rgb_view(3, 4, nullptr,nullptr,nullptr, 4); boost::gil::jpeg_write_view("out.jpg", view); return a.exec(); }
problems:
/usr/include/boost/gil/planar_pixel_iterator.hpp:55: error: no type named ‘value_type’ in ‘struct std::iterator_traitsstd::nullptr_t’
struct planar_pixel_iterator : public iterator_facade<planar_pixel_iterator<ChannelPtr,ColorSpace>,
^~~~~~~~~~~~~~~~~~~~~
/usr/include/boost/gil/planar_pixel_iterator.hpp:64: error: no type named ‘value_type’ in ‘struct std::iterator_traitsstd::nullptr_t’
const planar_pixel_reference<typename std::iterator_traits<ChannelPtr>::reference,ColorSpace> > parent_t;
^~~~~~~~ -
Hi and welcome to devnet,
What version of Qt are you using ?
On what platform ?
Which compiler ?
What version of boost gil ?
How did you install all of this ? -
Hello,
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
Ubuntu 18.04
Boost version: 1.65.1everything was installed with sudo apt install <package_name>
-
The compiler and its version are missing.
-
How to check it in QtCreator? because when I went to Tools > Options > Build & Run > Compilers I got a huge list with GCC, GCC 7 and Clang
-
@kyeiv The compiler is set in your Kit.
-
-
@kyeiv As you can see the you're using compiler named GCC (64bit). Now go to compilers tab and look for that compiler there.
-
As you can see i have got here 2 of them
-
@kyeiv They reference the same compiler.
To find out the exact version do/usr/bin/gcc -v
-
Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
-
@kyeiv said in Qt Creator boost/gil issues:
gcc version 7.4.0