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. Environment Variable
Forum Updated to NodeBB v4.3 + New Features

Environment Variable

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 8 Posters 3.8k Views 4 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 Guti

    ok, thank you - i will replace the backslashes, but I just want to mention:
    this settting is working ;-)

    aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by
    #12

    @Guti said in Environment Variable:

    this settting is working ;-)

    Unfortunately this doesn't mean it is correct. And it can stop working from one day to another... so better fix it.

    Regards

    Qt has to stay free or it will die.

    1 Reply Last reply
    2
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by 8Observer8
      #13

      Build Bullet from source useing CMake GUI and MinGW. You will get libs (files with .a extension). Place "include" and "lib" folder in common folder, for example, in "Libs/Bullet"

      Create an empty C++ project. Add these settings to .pro:

      INCLUDEPATH += "E:\Libs\Bullet3-2.89\include"
      
      LIBS += -L"E:\Libs\Bullet3-2.89\lib"
      LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
      
      SOURCES += \
          main.cpp
      

      Try to compile it:

      main.cpp

      #include <btBulletDynamicsCommon.h>
      
      int main()
      {
          btDefaultCollisionConfiguration *collisionConfiguration = new btDefaultCollisionConfiguration();
      
          return EXIT_SUCCESS;
      }
      

      It works.

      1 Reply Last reply
      1
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #14

        But I found a very strange behavior. If I write like this:

        LIBS += -lBulletCollision -lBulletDynamics -lLinearMath
        

        I will get these errors:

        btTypedConstraint.cpp:-1: error: undefined reference tobtCollisionObject::~btCollisionObject()'
        btTypedConstraint.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::btCollisionObject()'
        btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::serialize(void*, btSerializer*) const'
        btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'
        btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'
        btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'

        But if I change the order of libs it works correctly:

        LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
        
        JonBJ 1 Reply Last reply
        1
        • 8Observer88 8Observer8

          But I found a very strange behavior. If I write like this:

          LIBS += -lBulletCollision -lBulletDynamics -lLinearMath
          

          I will get these errors:

          btTypedConstraint.cpp:-1: error: undefined reference tobtCollisionObject::~btCollisionObject()'
          btTypedConstraint.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::btCollisionObject()'
          btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::serialize(void*, btSerializer*) const'
          btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'
          btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()' btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'
          btRigidBody.cpp:-1: error: undefined reference to btCollisionObject::~btCollisionObject()'

          But if I change the order of libs it works correctly:

          LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #15

          @8Observer8
          Does BulletDynamics reference something in BulletCollision? The order of library linking is significant.

          8Observer88 1 Reply Last reply
          1
          • G Guti

            hi,
            i am having the same issue (win10_x64)
            Qt Creator 4.9.1

            did set the BULLET_PATH_ENVIRONMENT to "C:\bulletphysics\bullet3"

            i am just trying to figure out the Qt 3D and bullet physics engine in order to get started with my own project

            currently i am trying to compile this simulator:
            https://github.com/patrickelectric/Qt3D-Konqi-Simulator

            therefore I checked out this repository
            https://bitbucket.org/csaga77/bullet-physics-qml-plugin/src/master/
            into this folder:
            Qt3D-Konqi-Simulator\lib\bullet-physics-qml-plugin

            and here you can see my build settings
            0_1560454689842_build settings.JPG

            I am also getting the error message "bullet development package not found"

            Can someone help me out?

            S Offline
            S Offline
            safylee
            wrote on last edited by
            #16

            @Guti have you solve the probem? I met the same trouble.The bullet package not found!

            G 1 Reply Last reply
            0
            • S safylee

              @Guti have you solve the probem? I met the same trouble.The bullet package not found!

              G Offline
              G Offline
              Guti
              wrote on last edited by Guti
              #17

              @safylee I did not solve it for this example project, but as I mentioned in a later comment, I could make the bullet engine work with my own project.

              1 Reply Last reply
              0
              • JonBJ JonB

                @8Observer8
                Does BulletDynamics reference something in BulletCollision? The order of library linking is significant.

                8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote on last edited by 8Observer8
                #18

                @JonB said in Environment Variable:

                The order of library linking is significant.

                Yes, I set this order of libraries and it works:

                LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
                
                JonBJ 1 Reply Last reply
                0
                • 8Observer88 8Observer8

                  @JonB said in Environment Variable:

                  The order of library linking is significant.

                  Yes, I set this order of libraries and it works:

                  LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
                  
                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #19

                  @8Observer8
                  Indeed, so it does. What do you find "a very strange behavior"? It is working as expected. Libraries expect to find other Libraries which resolve the first one's undefined references later on the linker line. If they came earlier the linker would not know they were needed by a later library.

                  8Observer88 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @8Observer8
                    Indeed, so it does. What do you find "a very strange behavior"? It is working as expected. Libraries expect to find other Libraries which resolve the first one's undefined references later on the linker line. If they came earlier the linker would not know they were needed by a later library.

                    8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote on last edited by
                    #20

                    @JonB said in Environment Variable:

                    Indeed, so it does. What do you find "a very strange behavior"?

                    I didn't know before that the order of the libraries mattered, so I called it strange behavior, but now I know.

                    JonBJ 1 Reply Last reply
                    1
                    • 8Observer88 8Observer8

                      @JonB said in Environment Variable:

                      Indeed, so it does. What do you find "a very strange behavior"?

                      I didn't know before that the order of the libraries mattered, so I called it strange behavior, but now I know.

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #21

                      @8Observer8
                      Ah yes, OK. The linker processes its files once in a single pass, left to right (there is no "going back" leftwards). Only those modules in a library which resolve currently (i.e. at the instant they are encountered) wanted symbols are pulled into the target executable. Else it would have to include everything just in case it's wanted later, and that's not how libraries work. So basically arrange them with the "lowest level" libraries to the right.

                      1 Reply Last reply
                      1

                      • Login

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