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. Creator: "run" not finding shared library

Creator: "run" not finding shared library

Scheduled Pinned Locked Moved Qt Creator and other tools
27 Posts 5 Posters 11.6k 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.
  • T Offline
    T Offline
    tbrowder
    wrote on 14 Mar 2011, 22:27 last edited by
    #3

    I created a new GUI project, and then deleted the files generated (except the .pro file) and started hand modifying the pro file with entries from my working, manual GUI project. I copied all source and header files into the project directory. In the pro file I defined headers and sources like this:

    SOURCES += *.cpp

    HEADERS += *.h

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 14 Mar 2011, 22:35 last edited by
      #4

      You cannot add the source files with wildcards, you must list them individually.

      You can create a template project file with

      @
      cd YourProjectDir
      qmake -project
      @

      This leaves a .pro in the directory. Go to Creator and open this file. The project will be imported. You can modify the .pro file later on, Creator will catch up the changes.

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

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tbrowder
        wrote on 14 Mar 2011, 22:44 last edited by
        #5

        Okay, I will do that and report results tomorrow. Thanks.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tbrowder
          wrote on 15 Mar 2011, 10:56 last edited by
          #6

          I've explicitly named the source and headers, but still get the same make error: the "-c" becomes "c" which generates an error.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on 15 Mar 2011, 10:59 last edited by
            #7

            Can you show us your complete .pro file, please.

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

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tbrowder
              wrote on 15 Mar 2011, 11:24 last edited by
              #8

              Hm, the file looks munged after pasting, Any way to attach a file?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on 15 Mar 2011, 11:28 last edited by
                #9

                wrap it in @ chars or use the code button (the rightmost button) of the editor.

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

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tbrowder
                  wrote on 15 Mar 2011, 11:29 last edited by
                  #10

                  Pro file follows:

                  @
                  ######################################################################

                  Automatically generated by qmake (2.01a) Mon Mar 14 19:04:49 2011

                  ######################################################################

                  TEMPLATE = app

                  QT += network opengl sql svg webkit xml xmlpatterns testlib dbus

                  TARGET = valuecommon
                  TEMPLATE = lib

                  DEFINES += LIBVALUECOMMON_LIBRARY

                  DEPENDPATH += .
                  INCLUDEPATH += .

                  unix:QMAKE_CXXFLAGS *= -include $(VALUE_HOME)/MSRS_config.h

                  use local choice of compiler, libraries, etc.

                  include($(VALUE_HOME)/msrs_features_creator.include)

                  Input

                  HEADERS += ajemDataHolder.h
                  base_t.h
                  blast.h
                  cadType.h
                  caseControl.h
                  caseSet.h
                  closedFormAlgorithm.h
                  compartment.h
                  compat.h
                  component.h
                  connector.h
                  constants.h
                  convert.h
                  counter.h
                  cylinder.h
                  damageMethod.h
                  damageMethodLibrary.h
                  designator.h
                  direntWin32.h
                  ellipsoid.h
                  energyTransfer.h
                  era_group.h
                  executionLogOptions.h
                  expatParser.h
                  external_blast.h
                  externalSuspension.h
                  extrusion.h
                  facet.h
                  faltNode.h
                  fastgen_comp.h
                  fastgen_filter.h
                  fCone.h
                  fDonut.h
                  fireStart.h
                  fixedDamageValue.h
                  fluidSystem.h
                  fragGroup.h
                  fragment.h
                  fragmentClosedForm.h
                  fragZone.h
                  fRec.h
                  fShape.h
                  fString.h
                  grid.h
                  gridprops.h
                  holeSize.h
                  indent_ns.h
                  influenceRegion.h
                  intersection.h
                  kernelBase.h
                  leaker.h
                  LokiExport.h
                  matrix33.h
                  mDebug.h
                  mEvent.h
                  munitionEventGrid.h
                  munitionEventMap.h

                  SOURCES += ajemDataHolder.cpp
                  base_t.cpp
                  blast.cpp
                  caseControl.cpp
                  caseSet.cpp
                  closedFormAlgorithm.cpp
                  compartment.cpp
                  component.cpp
                  component_gl.cpp
                  connector.cpp
                  connector_gl.cpp
                  convert.cpp
                  cylinder.cpp
                  cylinder_gl.cpp
                  damageMethodLibrary.cpp
                  designator.cpp
                  direntWin32.cpp
                  ellipsoid.cpp
                  ellipsoid_gl.cpp
                  energyTransfer.cpp
                  era_group.cpp
                  executionLogOptions.cpp
                  expatParser.cpp
                  external_blast.cpp
                  externalSuspension.cpp
                  extrusion.cpp
                  facet.cpp
                  faltNode.cpp
                  fastgen_comp.cpp
                  fastgen_filter.cpp
                  fCone.cpp
                  fDonut.cpp
                  fireStart.cpp
                  fixedDamageValue.cpp
                  fluidSystem.cpp
                  fragGroup.cpp
                  fragment.cpp
                  fragmentClosedForm.cpp
                  fragZone.cpp
                  fRec.cpp
                  fShape.cpp
                  fShape_gl.cpp
                  fString.cpp
                  grid.cpp
                  holeSize.cpp
                  influenceRegion.cpp
                  intersection.cpp
                  kernelBase.cpp
                  leaker.cpp
                  matrix33.cpp
                  mDebug.cpp
                  mEvent.cpp
                  MSRS_config.cpp
                  munitionEventGrid.cpp
                  munitionEventMap.cpp
                  @

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tbrowder
                    wrote on 15 Mar 2011, 11:30 last edited by
                    #11

                    Include file follows:

                    @

                    For adding "global" features to pro files.

                    Use new C++ standard?? not now (Ubuntu Qt causes problems)

                    #unix:QMAKE_CXXFLAGS += -std=c++0x

                    add Boost and other libs as needed:

                    unix::LIBS += -lboost_regex-mt
                    unix::LIBS += -lexpat
                    unix::LIBS += -ldl

                    comment this out for shared (normal) compiling and linking)

                    #CONFIG += profile

                    profile {

                    static building and linking

                    CONFIG += staticlib

                    enable profiling with gprof (will also need static compile)

                    unix:QMAKE_CXXFLAGS_DEBUG += -pg
                    unix:QMAKE_LFLAGS_DEBUG += -pg
                    }
                    else {

                    dynamic building and linking

                    CONFIG += -export-dynamic
                    unix:QMAKE_CXXFLAGS += -export-dynamic
                    }

                    Choose specific compiler versions for Linux

                    unix:QMAKE_CC = $(MYGCC)
                    unix:QMAKE_CXX = $(MYGXX)
                    unix:QMAKE_LINK = $(MYGXX)
                    unix:QMAKE_LINK_C = $(MYGCC)
                    unix:QMAKE_LINK_C_SHLIB = $(MYGCC)
                    unix:QMAKE_LINK_SHLIB = $(MYGXX)

                    special directories for auto-generated files

                    #OBJECTS_DIR = obj-autogen
                    #UI_DIR = ui-autogen
                    #MOC_DIR = moc-autogen
                    #RCC_DIR = qrc-autogen

                    for debugging and testing

                    #unix:QMAKE_CXXFLAGS += -Werror
                    unix:QMAKE_CXXFLAGS += -Wall
                    unix:QMAKE_CXXFLAGS += -Wextra
                    #unix:QMAKE_CXXFLAGS += -fno-inline # for valgrind memcheck

                    eliminate openNURBS warnings

                    unix:QMAKE_CXXFLAGS += -Wno-ignored-qualifiers

                    eliminate warnings of unused variables

                    unix:QMAKE_CXXFLAGS += -Wno-unused

                    temp define to eliminate stuff for the g2xml conversion

                    unix:DEFINES += SELECT_ALL_REGIONS

                    hack to tell version of BRL-CAD

                    DEFINES += MY_BRLCAD_VERSION=$(MY_BRLCAD_VERSION)

                    for materials aliases improvement later

                    #DEFINES += USE_TR1_SHARED_PTR

                    #DEFINES += NON_GUI_DEBUG

                    DEFINES += USE_VALUEFILE_H # trying to eliminate valueFile.h

                    #DEFINES += TAPE1CONV_DEBUG
                    #DEFINES += FALT_DEBUG # see faltNode.cpp and friends
                    #DEFINES += REPGEN_DEBUG # also checks base_t xnodeCreate
                    #DEFINES += GUI_DEBUG # see gui/appWindow.cpp
                    #DEFINES += RAYPATH_DEBUG # see target.cpp for use

                    #DEFINES += XNODE_DEBUG # see xNode.cpp (and ./non-gui/main.cpp)
                    #DEFINES += XNODE_IMPROVEMENT_STEP_ONE
                    #DEFINES += UNWIND_XNODE_STACK

                    #DEFINES += ERA_DEBUG # see tgm.cpp, threatType.cpp, pdamShapedCharge.cpp, and others
                    #DEFINES += FACESET_DEBUG # see xmlTgm.cpp and others

                    #DEFINES += FSHAPE_DEBUG # see fShape.cpp and others
                    #DEFINES += VALUE_DEBUG_COMP_ATTRS # used in xmlTgm.cpp, primarily for ERA regions
                    #DEFINES += AROD_DEBUG
                    #DEFINES += DDEBUG # a nan check
                    #DEFINES += EFP_DEBUG
                    #DEFINES += PDAM_SC_DEBUG # shaped charge check
                    #DEFINES += HE_DEBUG
                    #DEFINES += SC_DEBUG
                    #DEFINES += FRAG_DEBUG # frags (actually, not anything!) not getting kills
                    #DEFINES += RF_DEBUG
                    #DEFINES += RF_DEBUG_LEVEL2
                    #DEFINES += TGM_DEBUG
                    #DEFINES += VALUE_DEBUG # use for new/delete tracking

                    #DEFINES += USE_OLD_RAYPATH_ALGORITHM # see rayPath.cpp for use

                    #DEFINES += LIBTGM_DEBUG # use for reference counting

                    MANTECHLIB = -lmantech -lxqdbm -lxmlwrapp -ltokyocabinet -lz
                    @

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tbrowder
                      wrote on 15 Mar 2011, 11:31 last edited by
                      #12

                      The sources and headers list were shortened to meet 6000 char limit.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on 15 Mar 2011, 12:17 last edited by
                        #13

                        I would try to leave out ALL the additional stuff. Then re-add this stuff one by one (line by line) and see where and when it bails out.

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

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          giesbert
                          wrote on 15 Mar 2011, 12:31 last edited by
                          #14

                          headers and sources with multipüle line must end with , right?

                          @
                          SOURCES += ajemDataHolder.cpp
                          base_t.cpp
                          blast.cpp
                          caseControl.cpp
                          caseSet.cpp
                          closedFormAlgorithm.cpp
                          compartment.cpp
                          component.cpp
                          @

                          Nokia Certified Qt Specialist.
                          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andre
                            wrote on 15 Mar 2011, 12:48 last edited by
                            #15

                            [quote author="Gerolf" date="1300192313"]headers and sources with multipüle line must end with , right?

                            @
                            SOURCES += ajemDataHolder.cpp
                            base_t.cpp
                            blast.cpp
                            caseControl.cpp
                            caseSet.cpp
                            closedFormAlgorithm.cpp
                            compartment.cpp
                            component.cpp
                            @
                            [/quote]

                            Yes, they do.

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              tbrowder
                              wrote on 15 Mar 2011, 13:02 last edited by
                              #16

                              Okay, I will work on it line by line. Thanks.

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                giesbert
                                wrote on 15 Mar 2011, 13:05 last edited by
                                #17

                                some additional issues:

                                i know of

                                • XXX += y
                                • XXX -= y

                                but not of

                                • unix:QMAKE_CXXFLAGS *= -include $(VALUE_HOME)/MSRS_config.h

                                Nokia Certified Qt Specialist.
                                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  andre
                                  wrote on 15 Mar 2011, 13:11 last edited by
                                  #18

                                  *= is valid, Gerolf. It will add to the variable only if the added value is not already contained. I use it all the time. It is especially handy if you use .pri files that might get included more than once.

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    tbrowder
                                    wrote on 15 Mar 2011, 13:20 last edited by
                                    #19

                                    Note that my previous use of

                                    SOURCES += *.cpp
                                    HEADERS += *.h

                                    seemed to work. I have also used:

                                    SOURCES += $$system(ls $$(VALUE_HOME)/libvalutil/src/*.cpp

                                    and similar lines successfully on one of my original, non-Creator projects.

                                    -Tom

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      goetz
                                      wrote on 15 Mar 2011, 13:24 last edited by
                                      #20

                                      Creator just calls qmake and make and does not fiddle around in the project files and does not construct compiler command lines itself.

                                      If you .pro works on the command line, it works in Creator too.

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

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        andre
                                        wrote on 15 Mar 2011, 13:29 last edited by
                                        #21

                                        [quote author="Volker" date="1300195458"]Creator just calls qmake and make and does not fiddle around in the project files and does not construct compiler command lines itself.
                                        [/quote]
                                        But Creator does fiddle around with command line arguments and environment variables. Those too can influence your endresult!
                                        [quote]
                                        If you .pro works on the command line, it works in Creator too.[/quote]
                                        So the above is not entirely true.

                                        1 Reply Last reply
                                        0
                                        • G Offline
                                          G Offline
                                          goetz
                                          wrote on 15 Mar 2011, 13:48 last edited by
                                          #22

                                          Creator adds command line arguments to the qmake call (release/debug, mkspec and some defines for the QML debuger); for the actual build process it just calls "make -w" (you may add some additional arguments to make manually). The environment variables are just your regular environment when left in standard settings.

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

                                          1 Reply Last reply
                                          0

                                          12/27

                                          15 Mar 2011, 11:31

                                          • Login

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