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. Qcustomplot conflicits with ncurses.h

Qcustomplot conflicits with ncurses.h

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 287 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.
  • H Offline
    H Offline
    hitbuyi
    wrote on 14 May 2024, 16:19 last edited by
    #1

    When I include QCustomeplot and nurses.h into my project, they seems incompitible, my environment is

    Ubuntu20.04+Qt5.12.8+CMake 3.28

    the compiler error are below

    [main] Building folder: Lidar 
    [build] Starting build
    [proc] Executing command: /usr/local/bin/cmake --build /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/build --config Debug --target all -j 18 --
    [build] [  6%] Automatic MOC for target lidar_Perception
    [build] [  6%] Built target lidar_Perception_autogen
    [build] [ 13%] Building CXX object CMakeFiles/lidar_Perception.dir/lidar_Perception_autogen/mocs_compilation.cpp.o
    [build] [ 20%] Building CXX object CMakeFiles/lidar_Perception.dir/main.cpp.o
    [build] [ 26%] Building CXX object CMakeFiles/lidar_Perception.dir/mainwindow_lidar.cpp.o
    [build] In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextcursor.h:46,
    [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlineedit.h:45,
    [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QLineEdit:1,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/ui_fusionView.h:19,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/fusionView.h:15,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:29,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.cpp:1:
    [build] /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:816:25: error: macro "border" requires 8 arguments, but only 1 given
    [build]   816 |     inline qreal border() const
    [build]       |                         ^
    [build] In file included from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:27,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.cpp:1:
    [build] /usr/include/curses.h:1229: note: macro "border" defined here
    [build]  1229 | #define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
    [build]       | 
    [build] In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextcursor.h:46,
    [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlineedit.h:45,
    [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QLineEdit:1,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/ui_fusionView.h:19,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/fusionView.h:15,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:29,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/main.cpp:3:
    [build] /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:816:25: error: macro "border" requires 8 arguments, but only 1 given
    [build]   816 |     inline qreal border() const
    [build]       |                         ^
    [build] In file included from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:27,
    [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/main.cpp:3:
    [build] /usr/include/curses.h:1229: note: macro "border" defined here
    [build]  1229 | #define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
    [build]       | 
    
    ..............................................................................................................
    
    [build]       |          ^~~~~~
    [build] make[2]: *** [CMakeFiles/lidar_Perception.dir/build.make:104: CMakeFiles/lidar_Perception.dir/mainwindow_lidar.cpp.o] Error 1
    [build] make[2]: *** Waiting for unfinished jobs....
    [build] make[2]: *** [CMakeFiles/lidar_Perception.dir/build.make:90: CMakeFiles/lidar_Perception.dir/main.cpp.o] Error 1
    

    It seems both them have some macros or function names, how to solve this problem?

    J 1 Reply Last reply 14 May 2024, 16:51
    0
    • H hitbuyi
      14 May 2024, 16:19

      When I include QCustomeplot and nurses.h into my project, they seems incompitible, my environment is

      Ubuntu20.04+Qt5.12.8+CMake 3.28

      the compiler error are below

      [main] Building folder: Lidar 
      [build] Starting build
      [proc] Executing command: /usr/local/bin/cmake --build /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/build --config Debug --target all -j 18 --
      [build] [  6%] Automatic MOC for target lidar_Perception
      [build] [  6%] Built target lidar_Perception_autogen
      [build] [ 13%] Building CXX object CMakeFiles/lidar_Perception.dir/lidar_Perception_autogen/mocs_compilation.cpp.o
      [build] [ 20%] Building CXX object CMakeFiles/lidar_Perception.dir/main.cpp.o
      [build] [ 26%] Building CXX object CMakeFiles/lidar_Perception.dir/mainwindow_lidar.cpp.o
      [build] In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextcursor.h:46,
      [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlineedit.h:45,
      [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QLineEdit:1,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/ui_fusionView.h:19,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/fusionView.h:15,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:29,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.cpp:1:
      [build] /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:816:25: error: macro "border" requires 8 arguments, but only 1 given
      [build]   816 |     inline qreal border() const
      [build]       |                         ^
      [build] In file included from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:27,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.cpp:1:
      [build] /usr/include/curses.h:1229: note: macro "border" defined here
      [build]  1229 | #define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
      [build]       | 
      [build] In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextcursor.h:46,
      [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlineedit.h:45,
      [build]                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QLineEdit:1,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/ui_fusionView.h:19,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/fusionView.h:15,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:29,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/main.cpp:3:
      [build] /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:816:25: error: macro "border" requires 8 arguments, but only 1 given
      [build]   816 |     inline qreal border() const
      [build]       |                         ^
      [build] In file included from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/mainwindow_lidar.h:27,
      [build]                  from /home/hitbuyi/AD_Projects/Vis_Projects/Lidar/main.cpp:3:
      [build] /usr/include/curses.h:1229: note: macro "border" defined here
      [build]  1229 | #define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
      [build]       | 
      
      ..............................................................................................................
      
      [build]       |          ^~~~~~
      [build] make[2]: *** [CMakeFiles/lidar_Perception.dir/build.make:104: CMakeFiles/lidar_Perception.dir/mainwindow_lidar.cpp.o] Error 1
      [build] make[2]: *** Waiting for unfinished jobs....
      [build] make[2]: *** [CMakeFiles/lidar_Perception.dir/build.make:90: CMakeFiles/lidar_Perception.dir/main.cpp.o] Error 1
      

      It seems both them have some macros or function names, how to solve this problem?

      J Offline
      J Offline
      JonB
      wrote on 14 May 2024, 16:51 last edited by JonB
      #2

      @hitbuyi
      Since QCustomPlot is a third-party offering reach out to them?
      Which I see you have already done at https://www.qcustomplot.com/index.php/support/forum/2769
      If it's only a header file issue (which I think is the case) don't include ncurses where you are including QCustomPlot stuff --- I find it surprising you would want both in the same module, they have very different targets.

      H P 2 Replies Last reply 15 May 2024, 12:45
      2
      • J JonB
        14 May 2024, 16:51

        @hitbuyi
        Since QCustomPlot is a third-party offering reach out to them?
        Which I see you have already done at https://www.qcustomplot.com/index.php/support/forum/2769
        If it's only a header file issue (which I think is the case) don't include ncurses where you are including QCustomPlot stuff --- I find it surprising you would want both in the same module, they have very different targets.

        H Offline
        H Offline
        hitbuyi
        wrote on 15 May 2024, 12:45 last edited by
        #3

        @JonB Yes, When I exclude the ncurses.h, the compiling process is successful, If I want to use some part of ncures.h, is there any way to use both Qcustomplot and ncurses?

        1 Reply Last reply
        0
        • J JonB
          14 May 2024, 16:51

          @hitbuyi
          Since QCustomPlot is a third-party offering reach out to them?
          Which I see you have already done at https://www.qcustomplot.com/index.php/support/forum/2769
          If it's only a header file issue (which I think is the case) don't include ncurses where you are including QCustomPlot stuff --- I find it surprising you would want both in the same module, they have very different targets.

          P Offline
          P Offline
          Pl45m4
          wrote on 15 May 2024, 13:03 last edited by
          #4

          @JonB said in Qcustomplot conflicits with ncurses.h:

          If it's only a header file issue (which I think is the case) don't include ncurses where you are including QCustomPlot stuff

          No you read wrong :))

          @hitbuyi said in Qcustomplot conflicits with ncurses.h:

          When I include QCustomeplot and nurses.h into my project

          OP wants to include nurses :)))
          Wouldn't trust this kind of stuff... probably scam/fake and you don't get any nurse :D


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          J 1 Reply Last reply 15 May 2024, 13:20
          0
          • P Pl45m4
            15 May 2024, 13:03

            @JonB said in Qcustomplot conflicits with ncurses.h:

            If it's only a header file issue (which I think is the case) don't include ncurses where you are including QCustomPlot stuff

            No you read wrong :))

            @hitbuyi said in Qcustomplot conflicits with ncurses.h:

            When I include QCustomeplot and nurses.h into my project

            OP wants to include nurses :)))
            Wouldn't trust this kind of stuff... probably scam/fake and you don't get any nurse :D

            J Offline
            J Offline
            JonB
            wrote on 15 May 2024, 13:20 last edited by JonB
            #5

            @Pl45m4 said in Qcustomplot conflicits with ncurses.h:

            No you read wrong :))

            Did I? I only glanced, but I thought it was just an issue about ncurses.h being #included, where it has a #define border ... and that messes up something which has border in QCustomPlot, no? As opposed to it being a linker symbol error.

            @hitbuyi said in Qcustomplot conflicits with ncurses.h:

            @JonB Yes, When I exclude the ncurses.h, the compiling process is successful, If I want to use some part of ncures.h, is there any way to use both Qcustomplot and ncurses?

            I cannot imagine one source file would want to include QCustomPlot stuff, which is about drawing some stuff graphically on a pixel device, together with ncurses, which is about addressing a vt100-type terminal. Even if your project as a whole uses both of these, surely they are in separate areas and can be included into those areas quite separately from each other? Because it sounds like you are just #includeing "everything" in a single places/source file, which can be avoided?

            If not, you need to look at ncurses.h and what it does/defines which clashes with QCustomPlot and figure how to mitigate. For example, in the error message you show if we assume you are not going to need to use the ncurses border macro (which is #defined somewhere in ncurses) can you not put in #undef border immediately after where you go #include <ncurses> to resolve satisfactorily?

            P 1 Reply Last reply 15 May 2024, 13:30
            2
            • J JonB
              15 May 2024, 13:20

              @Pl45m4 said in Qcustomplot conflicits with ncurses.h:

              No you read wrong :))

              Did I? I only glanced, but I thought it was just an issue about ncurses.h being #included, where it has a #define border ... and that messes up something which has border in QCustomPlot, no? As opposed to it being a linker symbol error.

              @hitbuyi said in Qcustomplot conflicits with ncurses.h:

              @JonB Yes, When I exclude the ncurses.h, the compiling process is successful, If I want to use some part of ncures.h, is there any way to use both Qcustomplot and ncurses?

              I cannot imagine one source file would want to include QCustomPlot stuff, which is about drawing some stuff graphically on a pixel device, together with ncurses, which is about addressing a vt100-type terminal. Even if your project as a whole uses both of these, surely they are in separate areas and can be included into those areas quite separately from each other? Because it sounds like you are just #includeing "everything" in a single places/source file, which can be avoided?

              If not, you need to look at ncurses.h and what it does/defines which clashes with QCustomPlot and figure how to mitigate. For example, in the error message you show if we assume you are not going to need to use the ncurses border macro (which is #defined somewhere in ncurses) can you not put in #undef border immediately after where you go #include <ncurses> to resolve satisfactorily?

              P Offline
              P Offline
              Pl45m4
              wrote on 15 May 2024, 13:30 last edited by Pl45m4
              #6

              @JonB said in Qcustomplot conflicits with ncurses.h:

              Did I? I only glanced, but I thought it was just an issue about ncurses.h being #included, where it has a #define border ... and that messes up something which has border in QCustomPlot, no? As opposed to it being a linker symbol error.

              The answer is far too serious for the bad joke I made above :D
              The "c" is important, otherwise you are trying to include nurses :D

              @hitbuyi said in Qcustomplot conflicits with ncurses.h:

              When I include [ ... ] nurses.h into my project

              Read the topic again :)

              ( Ok, I'm already gone :P )


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              J 1 Reply Last reply 15 May 2024, 16:01
              0
              • P Pl45m4
                15 May 2024, 13:30

                @JonB said in Qcustomplot conflicits with ncurses.h:

                Did I? I only glanced, but I thought it was just an issue about ncurses.h being #included, where it has a #define border ... and that messes up something which has border in QCustomPlot, no? As opposed to it being a linker symbol error.

                The answer is far too serious for the bad joke I made above :D
                The "c" is important, otherwise you are trying to include nurses :D

                @hitbuyi said in Qcustomplot conflicits with ncurses.h:

                When I include [ ... ] nurses.h into my project

                Read the topic again :)

                ( Ok, I'm already gone :P )

                J Offline
                J Offline
                JonB
                wrote on 15 May 2024, 16:01 last edited by
                #7

                @Pl45m4 Ohhhhhhhhhhh, I never noticed..........

                1 Reply Last reply
                0

                6/7

                15 May 2024, 13:30

                • Login

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