[Qt-interest] qmake and staticlib issue
ami guru
dosto.walla at gmail.com
Mon Apr 20 01:48:05 CEST 2009
Hello forum,
Let me elaborate the scenario that i am stuck with
i have the following directories under src/
1.VrMath
2.DataStructs
3.OpenGLRender
4.RaytraceMgr
5.Graphics
I have .pro inside each of the above directories that compiles, creates
static libraries and put them inside lib that reside at the same hierarchy
as src
resides, copies the header files to the include which also reside at the
same hierarchy as the src do.
Now some of the directories inside src depends on other directories while
compilation. so i have put them in the INCLUDE path instead of the DEPEND
path. And they compile fine.
I have the error piling up when i am trying to create an application that
uses these libraries that created above. The error are as follows:
**********************************
CameraView.cpp:(.text+0xac9): undefined reference to `VectorR3::MaxAbs()
const'
CameraView.cpp:(.text+0xade): undefined reference to `VectorR3::MaxAbs()
const'
CameraView.cpp:(.text+0xb18): undefined reference to `VectorR3::MaxAbs()
const'
../../lib/libGraphics.a(Material.o): In function
`Material::CalcLocalLighting(VectorR3&, Light const&, VectorR3 const&,
double, VectorR3 const&, VectorR3 const&, VectorR3 const&, VectorR3 const*)
const':
Material.cpp:(.text+0x1ab): undefined reference to `VectorR3::MaxAbs()
const'
../../lib/libGraphics.a(Extents.o): In function
`CalcExtentsInBox(ViewableTriangle const&, VectorR3 const&, VectorR3 const&,
VectorR3*, VectorR3*)':
Extents.cpp:(.text+0x30e): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
../../lib/libGraphics.a(Extents.o): In function
`CalcExtentsInBox(ViewableParallelogram const&, VectorR3 const&, VectorR3
const&, VectorR3*, VectorR3*)':
Extents.cpp:(.text+0x5b4): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
../../lib/libGraphics.a(Extents.o): In function
`CalcExtentsInBox(ViewableParallelepiped const&, VectorR3 const&, VectorR3
const&, VectorR3*, VectorR3*)':
Extents.cpp:(.text+0x95a): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0xa6c): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0xb3d): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
../../lib/libGraphics.a(Extents.o):Extents.cpp:(.text+0xc6a): more undefined
references to `ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3
const&, VectorR3 const&, VectorR3 const&)' follow
../../lib/libGraphics.a(Extents.o): In function
`CalcExtentsInBox(Parallelepiped const&, VectorR3 const&, VectorR3 const&,
VectorR3*, VectorR3*)':
Extents.cpp:(.text+0x10a1): undefined reference to
`Parallelepiped::GetNormalFront() const'
Extents.cpp:(.text+0x10d7): undefined reference to
`Parallelepiped::GetFrontFace(VectorR3*) const'
Extents.cpp:(.text+0x10fd): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0x112e): undefined reference to
`Parallelepiped::GetBackFace(VectorR3*) const'
Extents.cpp:(.text+0x1145): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0x1165): undefined reference to
`Parallelepiped::GetNormalLeft() const'
Extents.cpp:(.text+0x11a2): undefined reference to
`Parallelepiped::GetRightFace(VectorR3*) const'
Extents.cpp:(.text+0x11b9): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0x11e2): undefined reference to
`Parallelepiped::GetLeftFace(VectorR3*) const'
Extents.cpp:(.text+0x11f9): undefined reference to
`ClipConvexPolygonAgainstBoundingBox(int, VectorR3*, VectorR3 const&,
VectorR3 const&, VectorR3 const&)'
Extents.cpp:(.text+0x1219): undefined reference to
`Parallelepiped::GetNormalBottom() const'
**********************************
Which means that the application is finding the .o file.
The .pro file content for the application is as follows:
***********************************************
TEMPLATE = app
CONFIG += debug_and_release
QT += opengl
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
INCLUDEPATH += ../../include/VrMath
INCLUDEPATH += ../../include/DataStructs
INCLUDEPATH += ../../include/Graphics
INCLUDEPATH += ../../include/OpenglRender
INCLUDEPATH += ../../include/RaytraceMgr
DESTDIR = ../../bin
QMAKE_LIBDIR += ../../lib
# Input
HEADERS += GLWidget.h
SOURCES += GLWidget.cpp main.cpp
CONFIG(debug, debug|release) {
LIBS += -L -lVrMath -lDataStructs -lGraphics -lRaytraceMgr
TARGET = RaytraceD
OBJECTS_DIR = ../../build/Raytrace/Debug
MOC_DIR = ../../build/Raytrace/Debug
}
CONFIG(release, debug|release) {
LIBS += -L -lVrMath -lDataStructs -lGraphics -lRaytraceMgr
TARGET = Raytrace
OBJECTS_DIR = ../../build/Raytrace/Release
MOC_DIR = ../../build/Raytrace/Release
DEFINES+=QT_NO_DEBUG
}
*********************************************************************************
While biulding the static libraries do i have to provide the library path as
well for the libraries that they depend on while building the library?
I have tried that ,but eneded up with the same error
What am i missing in the process ?
Thanks
Sajjad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/0ef7e3af/attachment.html
More information about the Qt-interest-old
mailing list