facing problem linking bullet library in QT

sarbartha
Posts: 5
Joined: Fri Apr 19, 2013 5:18 am

facing problem linking bullet library in QT

Post by sarbartha »

I am facing a problem linking bullet library in QT.

I have downloaded bullet-2.81-rev2613 and stored the library in my project folder. Then I have tried to add the bullet library and got th following error:
error: LinearMath/btVector3.h: No such file or directory

Please help me to get rid of it. Following is my .pro file

Code: Select all

#-------------------------------------------------
#
# Project created by QtCreator 2012-12-21T21:24:15
#
#-------------------------------------------------

QT       += core gui opengl

TARGET = garment
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    clothwidget.cpp \
    glwidget.cpp \
    expansion.cpp \
    interval.cpp \
    rootparitycollisiontest.cpp \
    matvec.cpp \
    openwindow.cpp \
    findfile.cpp \
    vertexpair.cpp \
    tripair.cpp \
    tri.cpp \
    solidobject.cpp \
    constraint.cpp \
    cloth.cpp \
    voxels.cpp

HEADERS  += mainwindow.h \
    clothwidget.h \
    glwidget.h \
    interval.h \
    interval_base.h \
    matvec.hpp \
    readPPM.hpp \
    rootparitycollisiontest.h \
    openwindow.h \
    findfile.h \
    expansion.h \
    cloth.h \
    constraint.h \
    vertexpair.h \
    tripair.h \
    tri.h \
    solidobject.h \
    voxels.h

CONFIG += console
 INSTALLS += target sources

LIBS += -lGL -lGLU -lglut

unix:!macx:!symbian: LIBS += -L$$PWD/bullet-2.81-rev2613/src/LinearMath/ -lLinearMath

INCLUDEPATH += $$PWD/bullet-2.81-rev2613/src/LinearMath
DEPENDPATH += $$PWD/bullet-2.81-rev2613/src/LinearMath

unix:!macx:!symbian: PRE_TARGETDEPS += $$PWD/bullet-2.81-rev2613/src/LinearMath/libLinearMath.a

unix:!macx:!symbian: LIBS += -L$$PWD/bullet-2.81-rev2613/src/BulletCollision/ -lBulletCollision

INCLUDEPATH += $$PWD/bullet-2.81-rev2613/src/BulletCollision
DEPENDPATH += $$PWD/bullet-2.81-rev2613/src/BulletCollision

unix:!macx:!symbian: PRE_TARGETDEPS += $$PWD/bullet-2.81-rev2613/src/BulletCollision/libBulletCollision.a

unix:!macx:!symbian: LIBS += -L$$PWD/bullet-2.81-rev2613/src/BulletDynamics/ -lBulletDynamics

INCLUDEPATH += $$PWD/bullet-2.81-rev2613/src/BulletDynamics
DEPENDPATH += $$PWD/bullet-2.81-rev2613/src/BulletDynamics

unix:!macx:!symbian: PRE_TARGETDEPS += $$PWD/bullet-2.81-rev2613/src/BulletDynamics/libBulletDynamics.a

Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: facing problem linking bullet library in QT

Post by Flix »

sarbartha wrote:error: LinearMath/btVector3.h: No such file or directory
You should add in INCLUDEPATH the PARENT folder of the LinearMath folder, (probably: INCLUDEPATH += $$PWD/bullet-2.81-rev2613/src, if $$PWD refers to the right place; otherwise consider using full paths).