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. Error: :cannot specify -o when generating multiple output files VTK + QT

Error: :cannot specify -o when generating multiple output files VTK + QT

Scheduled Pinned Locked Moved General and Desktop
qt5.4vtkerror
16 Posts 3 Posters 9.8k 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.
  • M Offline
    M Offline
    mcosta
    wrote on 2 Jul 2015, 19:35 last edited by
    #6

    Hi,

    is the file QVTKApplication.h inside /usr/include/vtk-6.2/ ??

    Once your problem is solved don't forget to:

    • Mark the thread as SOLVED using the Topic Tool menu
    • Vote up the answer(s) that helped you to solve the issue

    You can embed images using (http://imgur.com/) or (http://postimage.org/)

    L 1 Reply Last reply 2 Jul 2015, 23:24
    1
    • M mcosta
      2 Jul 2015, 19:35

      Hi,

      is the file QVTKApplication.h inside /usr/include/vtk-6.2/ ??

      L Offline
      L Offline
      Lays147
      wrote on 2 Jul 2015, 23:24 last edited by
      #7

      @mcosta I made a mistake, now this is my pro file:
      QT += core gui

      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

      TARGET = Pandora
      TEMPLATE = app
      TRANSLATIONS = EN_english.ts
      PT_portuguese.ts\

      SOURCES += main.cpp
      brprint3d.cpp
      loading.cpp
      legalwarning.cpp
      aboutbrprint.cpp
      documentation.cpp
      help.cpp
      warning.cpp

      HEADERS += brprint3d.h
      loading.h
      legalwarning.h
      aboutbrprint.h
      documentation.h
      help.h
      warning.h \

      FORMS +=
      loading.ui
      legalwarning.ui
      aboutbrprint.ui
      documentation.ui
      help.ui
      warning.ui
      Pandora.ui

      RESOURCES +=
      images.qrc
      translations.qrc
      fonts.qrc

      DISTFILES +=

      But i'm still have problems, if i do this way:

      INCLUDEPATH += "/usr/local/include/vtk-6.2/"
      LIBS += -L"/usr/local/lib" -lvtksys -lQVTK -lvtkRendering -lvtkGraphics -lvtkIO -lvtkInfovis -lvtkViews -lvtkFiltering -lvtkHybrid -lvtkWidgets

      I'm get this errors:
      /usr/bin/ld: cannot find -lvtkCommon
      /usr/bin/ld: cannot find -lvtksys
      /usr/bin/ld: cannot find -lQVTK
      /usr/bin/ld: cannot find -lvtkRendering
      /usr/bin/ld: cannot find -lvtkGraphics
      /usr/bin/ld: cannot find -lvtkIO
      /usr/bin/ld: cannot find -lvtkInfovis
      /usr/bin/ld: cannot find -lvtkViews
      /usr/bin/ld: cannot find -lvtkFiltering
      /usr/bin/ld: cannot find -lvtkHybrid

      If i do this:
      INCLUDEPATH += "/usr/local/include/vtk-6.2/"
      LIBS += -L"/usr/local/lib"
      I get this errors:
      "../Pandora/brprint3d.cpp:(.text+0x49cc): undefined reference to `vtkSmartPointerBase::~vtkSmartPointerBase()'"

      How to link the libraries?

      Lays Rodrigues
      Newby on Qt - Learning always!
      Using QT 5.7
      ArchLinux

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mcosta
        wrote on 3 Jul 2015, 07:55 last edited by
        #8

        Hi are the libraries inside /usr/local/lib?

        What's the full name of the library file?

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        L 1 Reply Last reply 3 Jul 2015, 17:56
        0
        • M mcosta
          3 Jul 2015, 07:55

          Hi are the libraries inside /usr/local/lib?

          What's the full name of the library file?

          L Offline
          L Offline
          Lays147
          wrote on 3 Jul 2015, 17:56 last edited by
          #9

          @mcosta this printscreen should help: http://pt-br.tinypic.com/r/j7bvd4/8

          Lays Rodrigues
          Newby on Qt - Learning always!
          Using QT 5.7
          ArchLinux

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mcosta
            wrote on 3 Jul 2015, 18:06 last edited by
            #10

            Hi,

            I think that you should add -6.2 to the name of all libraries in LIBS

            LIBS += -L/usr/local/lib -lvtkCommonCore-62 .....
            

            the name scheme passed to the linker is this
            -l<lib_name> looks for a file called lib<lib_name>.so

            Once your problem is solved don't forget to:

            • Mark the thread as SOLVED using the Topic Tool menu
            • Vote up the answer(s) that helped you to solve the issue

            You can embed images using (http://imgur.com/) or (http://postimage.org/)

            L 1 Reply Last reply 3 Jul 2015, 20:20
            0
            • M mcosta
              3 Jul 2015, 18:06

              Hi,

              I think that you should add -6.2 to the name of all libraries in LIBS

              LIBS += -L/usr/local/lib -lvtkCommonCore-62 .....
              

              the name scheme passed to the linker is this
              -l<lib_name> looks for a file called lib<lib_name>.so

              L Offline
              L Offline
              Lays147
              wrote on 3 Jul 2015, 20:20 last edited by Lays147 7 Mar 2015, 20:22
              #11

              @mcosta I did this:
              INCLUDEPATH += "/usr/local/include/vtk-6.2/"
              LIBS += -L"/usr/local/lib" -lvtkCommonCore-6.2 -lvtkalglib-6.2 -lvtkChartsCore-6.2 -lvtkDICOMParser-6.2 -lvtkDomainsChemistry-6.2 -lvtkexpat-6.2
              -lvtkFiltersCore-6.2 -lvtkfreetype-6.2 -lvtkGeovisCore-6.2 -lvtkgl2ps-6.2 -lvtkGUISupportQt-6.2 -lvtkhdf5-6.2 -lvtkImagingCore-6.2 -lvtkInfovisCore-6.2
              -lvtkInteractionImage-6.2 -lvtkInteractionStyle-6.2 -lvtkInteractionWidgets-6.2 -lvtkIOCore-6.2 -lvtkParallelCore-6.2 -lvtkRenderingCore-6.2 -lvtksys-6.2 -lvtkViewsCore-6.2\ -lvtkViewsQt-6.2 -lvtkzlib-6.2

              And now i got this error:
              error: brprint3d.o: undefined reference to symbol '_ZN12vtkAlgorithm13GetOutputPortEi'

              Because of this: "If you get something that looks like:
              undefined reference to `__imp___ZN13vtkTIFFReader3NewEv' collect2: ld returned 1 exit status. You certainly forgot to pass in a library to your executable."
              But if i add all the vtk libs, how i forgot to pass a library?

              how to fix it?

              Lays Rodrigues
              Newby on Qt - Learning always!
              Using QT 5.7
              ArchLinux

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mcosta
                wrote on 3 Jul 2015, 20:29 last edited by
                #12

                Hi,

                sorry I don't know VTK so I can't help you.
                You could try to understand in which library vtkTIFFReader is defined and verify that that library is really loaded

                Once your problem is solved don't forget to:

                • Mark the thread as SOLVED using the Topic Tool menu
                • Vote up the answer(s) that helped you to solve the issue

                You can embed images using (http://imgur.com/) or (http://postimage.org/)

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  alex_malyu
                  wrote on 3 Jul 2015, 21:53 last edited by
                  #13

                  Try to put
                  #include <vtkAutoInit.h>

                  VTK_MODULE_INIT( vtkRenderingOpenGL );
                  VTK_MODULE_INIT( vtkInteractionStyle );
                  VTK_MODULE_INIT( vtkRenderingFreeTypeOpenGL );
                  VTK_MODULE_INIT( vtkRenderingFreeType );

                  right before your main
                  Also vtk has its own mailing list you could try there.
                  I just have not used it on Linux for ages.

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    Lays147
                    wrote on 3 Jul 2015, 21:57 last edited by
                    #14

                    I alredy compiled my app, but now i have this error: no override found for 'vtkPolyDataMapper' when i run my app and try to read my file, the app crash.
                    I discover that i need to use cmake, but i dont now how to write the cmakelists.txt

                    @alex_malyu this is to put and works without build with cmake?

                    Lays Rodrigues
                    Newby on Qt - Learning always!
                    Using QT 5.7
                    ArchLinux

                    A 1 Reply Last reply 3 Jul 2015, 22:10
                    0
                    • M Offline
                      M Offline
                      mcosta
                      wrote on 3 Jul 2015, 22:06 last edited by
                      #15

                      CMake is very easy to use (I prefer it to qmake).

                      In the VTK website you find a lot of examples and here you can read some information how to use it to build applications using Qt

                      Once your problem is solved don't forget to:

                      • Mark the thread as SOLVED using the Topic Tool menu
                      • Vote up the answer(s) that helped you to solve the issue

                      You can embed images using (http://imgur.com/) or (http://postimage.org/)

                      1 Reply Last reply
                      0
                      • L Lays147
                        3 Jul 2015, 21:57

                        I alredy compiled my app, but now i have this error: no override found for 'vtkPolyDataMapper' when i run my app and try to read my file, the app crash.
                        I discover that i need to use cmake, but i dont now how to write the cmakelists.txt

                        @alex_malyu this is to put and works without build with cmake?

                        A Offline
                        A Offline
                        alex_malyu
                        wrote on 3 Jul 2015, 22:10 last edited by
                        #16

                        @Lays147

                        I do not have to use cmake,
                        We just build vtk and qt and link to them in VS project.

                        If it is linked but you get run-time error it means there is lack of run-time initialization ( related to system/driver specific needs),
                        If you used CMAKE this would be handled buy cot it generate.
                        Above given code provides initialization of some modules and is sufficient for me .

                        1 Reply Last reply
                        0

                        15/16

                        3 Jul 2015, 22:06

                        • Login

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