Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Paraview Plugin based on Qt fails to link on Mac OS OX (10.6.8 Snow | gcc 4.2.1 | Qt 4.7 | CMake 2.8-2 | x86_64 is on)

Paraview Plugin based on Qt fails to link on Mac OS OX (10.6.8 Snow | gcc 4.2.1 | Qt 4.7 | CMake 2.8-2 | x86_64 is on)

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 2 Posters 9.1k 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.
  • G Offline
    G Offline
    goetz
    wrote on last edited by
    #5

    Looks like something is not built with the proper architectures, so some symbols are missing. You must adjust the settings of your plugin to the settings of the Qt and ParaView builds.

    http://www.catb.org/~esr/faqs/smart-questions.html

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nyotis
      wrote on last edited by
      #6

      i built the plugin with a simple makefile. What confuses me is the successful build of the plugin as a static lib and the failure of a shared lib.. My configuration for these two cases is the same..

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #7

        I would recommend using a .pro file and qmake for building your pluging.

        Anyways, make sure you add the following switches to the command line arguments of your C/C++ compiler and the linker:

        @
        -arch x86_64 -arch i386
        @

        This will build 32bit and 64bit code for intel processors. You might want to add other archs as well (ppc, ppc64) if needed.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nyotis
          wrote on last edited by
          #8

          thanks Volker. is there any automatic script for converting my CMakeLists.txt of the plugin to a .pro file
          (something more advanced than qmake -project)? or the converse of this report
          http://developer.qt.nokia.com/quarterly/view/using_cmake_to_build_qt_projects ?
          i guess Cmake works better for building Paraview (same family), but for Qt plug-ins i should use Qmake..

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nyotis
            wrote on last edited by
            #9

            as for the arch flags, they are there in both Xcode and command line

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nyotis
              wrote on last edited by
              #10

              qmake -project outputs a src_qmake.pbproj file that i rename to src_qmake.xcodeproj. Is this the expected behavior? I cannot launch src_qmake.xcodeproj, it complains about incompatible project version.

              thanks

              N

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #11

                "qmake -project" usually outputs a xyz.pro file (with xyz being the directory name you're in).

                If you want an XCode project generated out of the .pro file, you need to issue:

                @
                qmake -spec macx-xcode
                @

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nyotis
                  wrote on last edited by
                  #12

                  thanks volker, i was going with qmake -spec macx-g++ and was expecting an xcode project

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #13

                    qmake -spec macx-g++ generates a regular Makefile. You can build it with make.

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      nyotis
                      wrote on last edited by
                      #14

                      I was too fast in replying..
                      qmake -project and then qmake -spec macx-xcode outputs src_qmake.pbproj that i rename to src_qmake.xcodeproj. as i 've written earlier on, this is not loaded in Xcode..

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on last edited by
                        #15

                        something is seriously going wrong there.

                        @
                        qmake -spec macx-xcode
                        @

                        should create a directory named src_qmake.xcodeproj, which in turn contains a file named project.pbxproj.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          nyotis
                          wrote on last edited by
                          #16

                          OK, sth is wrong indeed. in a hello directory consisting of hello.cpp and hello.pro i go with

                          @qmake -spec macx-g++@ and the little gui (hello.app) builds fine, whereas with

                          @qmake -spec macx-xcode@ i get a hello.pbproj and the related plist without any Xcode directory.
                          i 'll build qt from scratch, thanks

                          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