Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Linking CGAL & BOOSt to qt-creator project
Forum Updated to NodeBB v4.3 + New Features

Linking CGAL & BOOSt to qt-creator project

Scheduled Pinned Locked Moved Unsolved General and Desktop
boostqtcreatorc++vc2013cgal
14 Posts 5 Posters 5.5k Views 1 Watching
  • 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.
  • N nour.m
    3 Apr 2018, 11:08

    I'm trying to use CGAL and BOOST libraries in a QT-Creator project
    I'm facing many errors in BOOST,QT headers which are already in their packages not on my code
    alt text

    Compile output:

    http://freetexthost.com/43fkwbup01

    .pro file :

    #-------------------------------------------------
    #
    # Project created by QtCreator 2018-04-02T13:41:57
    #
    #-------------------------------------------------
    
    QT       += core gui
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
    
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = dr_proj
    TEMPLATE = app
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked as 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\
            mainwindow.cpp \
        my_polyhedron.cpp \
        myqglwidget.cpp
    
    HEADERS  += mainwindow.h \
        My_CGAL_Config.h \
        My_Face_base.h \
        My_Halfedge_base.h \
        my_polyhedron.h \
        My_Vertex_base.h \
        myqglwidget.h
    
    FORMS    += mainwindow.ui
    
    INCLUDEPATH += C:/dev/CGAL-4.9/auxiliary/gmp/include
    INCLUDEPATH += C:/dev/CGAL-4.9/include
    INCLUDEPATH += C:/local/boost_1_59_0/
    INCLUDEPATH += C:/dev/libQGLViewer-2.7.1/QGLViewer
    INCLUDEPATH += C:/dev/CGAL-4.9/build/include
    INCLUDEPATH += C:/Qt/Qt5.7.1/5.7/msvc2013_64/include
    INCLUDEPATH += C:/Qt/Qt5.7.1\5.7/msvc2013_64/include/QtXml
    INCLUDEPATH += C:/Qt/Qt5.7.1/5.7/msvc2013_64/include/QtOpenGL
    
    
    LIBS += -LC:/dev/CGAL-4.9/lib
    LIBS += -LC:/local/boost_1_59_0/libs
    LIBS += -LC:/dev/libQGLViewer-2.7.1/QGLViewer\ -lQGLViewerd2
    LIBS += -LC:/Qt/Qt5.7.1/5.7/msvc2013_64/lib
    LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0\
    LIBS +=-LC:/local/boost_1_59_0/lib64-msvc-12.0\ -libboost_system-vc120-mt-1_59
    LIBS +=-LC:/local/boost_1_59_0/lib64-msvc-12.0\ -libboost_thread-vc120-mt-1_59
    LIBS +=-LC:/local/boost_1_59_0/lib64-msvc-12.0\  -boost_filesystem-vc120-mt-1_59
    
    DEPENDPATH += C:/dev/libQGLViewer-2.7.1/QGLViewer
    DEPENDPATH += C:/local/boost_1_59_0/libs
    DEPENDPATH += C:/dev/CGAL-4.9/lib
    DEPENDPATH += C:/Qt/Qt5.7.1/5.7/msvc2013_64/lib
    DEPENDPATH += C:/local/boost_1_59_0/lib64-msvc-12.0
    

    MOST of errors about
    *'boost::get (expects another no of arguments)

    • could not deduce template argument for 'const boost::readable * 'normal' : is not a member of 'CGAL::Point_3'

    I appreciate any help , thanks

    J Offline
    J Offline
    J.Hilk
    Moderators
    wrote on 3 Apr 2018, 11:58 last edited by
    #3

    @nour.m
    hi,
    I'm by no means an expert in this, but your *.pro file is full of errors, try to fix them, make a clean build afterwards and lets se what happens than.

    first of dont use \ in your path, a \ in path is Windows only, your project file will interpret this as, "continue in next line"

    LIBS += -LC:\local\boost_1_59_0\lib64-msvc-12.0
            -libboost_system-vc120-mt-1_59
            -libboost_thread-vc120-mt-1_59
    

    should be

    LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0 \
            -libboost_system-vc120-mt-1_59 \
            -libboost_thread-vc120-mt-1_59
    

    Edit: @jsulm was a bit faster :)


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    N 1 Reply Last reply 3 Apr 2018, 12:27
    5
    • J J.Hilk
      3 Apr 2018, 11:58

      @nour.m
      hi,
      I'm by no means an expert in this, but your *.pro file is full of errors, try to fix them, make a clean build afterwards and lets se what happens than.

      first of dont use \ in your path, a \ in path is Windows only, your project file will interpret this as, "continue in next line"

      LIBS += -LC:\local\boost_1_59_0\lib64-msvc-12.0
              -libboost_system-vc120-mt-1_59
              -libboost_thread-vc120-mt-1_59
      

      should be

      LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0 \
              -libboost_system-vc120-mt-1_59 \
              -libboost_thread-vc120-mt-1_59
      

      Edit: @jsulm was a bit faster :)

      N Offline
      N Offline
      nour.m
      wrote on 3 Apr 2018, 12:27 last edited by
      #4

      @J.Hilk Thanks a lot for help
      I updated the .pro file , then clean &rebuild
      and the errors still

      J 1 Reply Last reply 3 Apr 2018, 12:30
      0
      • N nour.m
        3 Apr 2018, 12:27

        @J.Hilk Thanks a lot for help
        I updated the .pro file , then clean &rebuild
        and the errors still

        J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 3 Apr 2018, 12:30 last edited by
        #5

        @nour.m
        can you post your modified pro file?

        @jsulm mentioned one error, I an other one and at least one was not mentioned by either of us.

        Also you need need to run qmake after modifiying the project file. I'm not sure if thats part of the normal clean/rebuild functionality


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        N 1 Reply Last reply 3 Apr 2018, 12:48
        4
        • J J.Hilk
          3 Apr 2018, 12:30

          @nour.m
          can you post your modified pro file?

          @jsulm mentioned one error, I an other one and at least one was not mentioned by either of us.

          Also you need need to run qmake after modifiying the project file. I'm not sure if thats part of the normal clean/rebuild functionality

          N Offline
          N Offline
          nour.m
          wrote on 3 Apr 2018, 12:48 last edited by
          #6

          @J.Hilk
          http://freetexthost.com/l5wzgtntzb

          J 1 Reply Last reply 3 Apr 2018, 12:55
          0
          • N nour.m
            3 Apr 2018, 12:48

            @J.Hilk
            http://freetexthost.com/l5wzgtntzb

            J Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 3 Apr 2018, 12:55 last edited by
            #7

            @nour.m

            I actually posted this previously, but you need to change this

            LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0/
            -libboost_system-vc120-mt-1_59/
            -libboost_thread-vc120-mt-1_59/
            -boost_filesystem-vc120-mt-1_59
            

            to

            LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0\
            -libboost_system-vc120-mt-1_59\
            -libboost_thread-vc120-mt-1_59\
            -boost_filesystem-vc120-mt-1_59
            

            otherwise

            • -libboost_system-vc120-mt-1_59
            • -libboost_thread-vc120-mt-1_59
              and
            • -boost_filesystem-vc120-mt-1_59

            will not be included.
            The normal backwards Slash \ has its uses in the project file and here's one of them!

            or add the whole path

            LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0
            LIBS += -LC:/local/boost_1_59_0/libboost_system-vc120-mt-1_59
            LIBS += -LC:/local/boost_1_59_0/libboost_thread-vc120-mt-1_59
            LIBS += -LC:/local/boost_1_59_0/boost_filesystem-vc120-mt-1_59
            

            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            K N 2 Replies Last reply 3 Apr 2018, 20:18
            4
            • J J.Hilk
              3 Apr 2018, 12:55

              @nour.m

              I actually posted this previously, but you need to change this

              LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0/
              -libboost_system-vc120-mt-1_59/
              -libboost_thread-vc120-mt-1_59/
              -boost_filesystem-vc120-mt-1_59
              

              to

              LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0\
              -libboost_system-vc120-mt-1_59\
              -libboost_thread-vc120-mt-1_59\
              -boost_filesystem-vc120-mt-1_59
              

              otherwise

              • -libboost_system-vc120-mt-1_59
              • -libboost_thread-vc120-mt-1_59
                and
              • -boost_filesystem-vc120-mt-1_59

              will not be included.
              The normal backwards Slash \ has its uses in the project file and here's one of them!

              or add the whole path

              LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0
              LIBS += -LC:/local/boost_1_59_0/libboost_system-vc120-mt-1_59
              LIBS += -LC:/local/boost_1_59_0/libboost_thread-vc120-mt-1_59
              LIBS += -LC:/local/boost_1_59_0/boost_filesystem-vc120-mt-1_59
              
              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 3 Apr 2018, 20:18 last edited by
              #8

              A minor error on your part:

              LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0 \
              -lboost_system-vc120-mt-1_59 \
              -lboost_thread-vc120-mt-1_59 \
              -lboost_filesystem-vc120-mt-1_59
              

              Library prefixes are handled automatically with qmake when the proper -l switch is passed.

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              4
              • J J.Hilk
                3 Apr 2018, 12:55

                @nour.m

                I actually posted this previously, but you need to change this

                LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0/
                -libboost_system-vc120-mt-1_59/
                -libboost_thread-vc120-mt-1_59/
                -boost_filesystem-vc120-mt-1_59
                

                to

                LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0\
                -libboost_system-vc120-mt-1_59\
                -libboost_thread-vc120-mt-1_59\
                -boost_filesystem-vc120-mt-1_59
                

                otherwise

                • -libboost_system-vc120-mt-1_59
                • -libboost_thread-vc120-mt-1_59
                  and
                • -boost_filesystem-vc120-mt-1_59

                will not be included.
                The normal backwards Slash \ has its uses in the project file and here's one of them!

                or add the whole path

                LIBS += -LC:/local/boost_1_59_0/lib64-msvc-12.0
                LIBS += -LC:/local/boost_1_59_0/libboost_system-vc120-mt-1_59
                LIBS += -LC:/local/boost_1_59_0/libboost_thread-vc120-mt-1_59
                LIBS += -LC:/local/boost_1_59_0/boost_filesystem-vc120-mt-1_59
                
                N Offline
                N Offline
                nour.m
                wrote on 4 Apr 2018, 07:52 last edited by nour.m 4 Apr 2018, 07:52
                #9

                @J.Hilk @kshegunov I updated the .pro file and the same errors are still found

                A 1 Reply Last reply 4 Apr 2018, 08:46
                0
                • N nour.m
                  4 Apr 2018, 07:52

                  @J.Hilk @kshegunov I updated the .pro file and the same errors are still found

                  A Offline
                  A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on 4 Apr 2018, 08:46 last edited by
                  #10

                  @nour-m

                  When I look at your upload at this section:

                  SOURCES += main.cpp
                  mainwindow.cpp
                  my_polyhedron.cpp
                  myqglwidget.cpp
                  

                  then you miss the backslashes here!

                  It should be:

                  SOURCES += main.cpp \
                      mainwindow.cpp \
                      my_polyhedron.cpp \
                      myqglwidget.cpp
                  

                  Please check your project file everywhere and upload it again for review afterwards.

                  Thanks

                  Qt has to stay free or it will die.

                  N 1 Reply Last reply 4 Apr 2018, 11:22
                  4
                  • A aha_1980
                    4 Apr 2018, 08:46

                    @nour-m

                    When I look at your upload at this section:

                    SOURCES += main.cpp
                    mainwindow.cpp
                    my_polyhedron.cpp
                    myqglwidget.cpp
                    

                    then you miss the backslashes here!

                    It should be:

                    SOURCES += main.cpp \
                        mainwindow.cpp \
                        my_polyhedron.cpp \
                        myqglwidget.cpp
                    

                    Please check your project file everywhere and upload it again for review afterwards.

                    Thanks

                    N Offline
                    N Offline
                    nour.m
                    wrote on 4 Apr 2018, 11:22 last edited by
                    #11

                    @aha_1980 done

                    A 1 Reply Last reply 5 Apr 2018, 04:07
                    0
                    • N nour.m
                      4 Apr 2018, 11:22

                      @aha_1980 done

                      A Offline
                      A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on 5 Apr 2018, 04:07 last edited by
                      #12

                      @nour.m where?

                      Qt has to stay free or it will die.

                      N 1 Reply Last reply 5 Apr 2018, 07:28
                      0
                      • A aha_1980
                        5 Apr 2018, 04:07

                        @nour.m where?

                        N Offline
                        N Offline
                        nour.m
                        wrote on 5 Apr 2018, 07:28 last edited by
                        #13

                        @aha_1980 I updated the post

                        J 1 Reply Last reply 5 Apr 2018, 08:03
                        0
                        • N nour.m
                          5 Apr 2018, 07:28

                          @aha_1980 I updated the post

                          J Offline
                          J Offline
                          J.Hilk
                          Moderators
                          wrote on 5 Apr 2018, 08:03 last edited by
                          #14

                          @nour.m

                          if you mean here:
                          http://freetexthost.com/l5wzgtntzb
                          than no, you did not make the changes @aha_1980 told you to do

                          SOURCES += main.cpp
                          mainwindow.cpp 
                          my_polyhedron.cpp 
                          myqglwidget.cpp
                          
                          HEADERS += mainwindow.h 
                          My_CGAL_Config.h 
                          My_Face_base.h 
                          My_Halfedge_base.h 
                          my_polyhedron.h 
                          My_Vertex_base.h 
                          myqglwidget.h
                          

                          still mising \ at the end of the line

                          also you are adding the widgets module twice. I'm not sure in what that will result, but you should remove one

                          QT += core gui
                          QT += widgets //remove me
                          DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
                          
                          
                          greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                          

                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          1 Reply Last reply
                          1

                          12/14

                          5 Apr 2018, 04:07

                          • Login

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