Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator boost/gil issues

Qt Creator boost/gil issues

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
12 Posts 3 Posters 934 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kyeiv
    wrote on last edited by Kyeiv
    #1

    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;
    ^~~~~~~~

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kyeiv
        wrote on last edited by
        #3

        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.1

        everything was installed with sudo apt install <package_name>

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The compiler and its version are missing.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kyeiv
            wrote on last edited by
            #5

            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

            jsulmJ 1 Reply Last reply
            0
            • K Kyeiv

              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

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @kyeiv The compiler is set in your Kit.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Kyeiv
                wrote on last edited by
                #7

                0_1564985975827_Screenshot from 2019-08-05 08-17-13.png

                jsulmJ 1 Reply Last reply
                0
                • K Kyeiv

                  0_1564985975827_Screenshot from 2019-08-05 08-17-13.png

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @kyeiv As you can see the you're using compiler named GCC (64bit). Now go to compilers tab and look for that compiler there.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    Kyeiv
                    wrote on last edited by
                    #9

                    As you can see i have got here 2 of them 0_1564994746073_Screenshot from 2019-08-05 10-44-31.png 0_1564994752756_Screenshot from 2019-08-05 10-43-46.png

                    jsulmJ 1 Reply Last reply
                    0
                    • K Kyeiv

                      As you can see i have got here 2 of them 0_1564994746073_Screenshot from 2019-08-05 10-44-31.png 0_1564994752756_Screenshot from 2019-08-05 10-43-46.png

                      jsulmJ Online
                      jsulmJ Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @kyeiv They reference the same compiler.
                      To find out the exact version do

                      /usr/bin/gcc -v
                      

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        Kyeiv
                        wrote on last edited by
                        #11
                        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) 
                        
                        
                        jsulmJ 1 Reply Last reply
                        0
                        • K Kyeiv
                          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) 
                          
                          
                          jsulmJ Online
                          jsulmJ Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @kyeiv said in Qt Creator boost/gil issues:

                          gcc version 7.4.0

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved