Qt OCC linker error

I am getting some linker problem when i try to run my Qt-OCC application on LINUX. I am using OCC 6.2 and gcc version 4.1.2 20061115 (prerelease) (SUSE Linux).

for linking the OCC library , i have used
LIBS += -L$(CASROOT)/lin/lib
-lBinLPlugin .....

I am putting the screen shot of the error at:

http://www.flickr.com/photo_zoom.gne?id=489660829&size=o

Rajesh Kishore's picture

And I am getting the following parse error while compiling:

Project MESSAGE: Building for Linux
QtOpenCascadeLinux.pri:78: Parse Error ('-lBinLPlugin -lBinPlugin -lBinXCAFPlugi
n -lFWOSPlugin -lmscmd -lPTKernel -lStdLPlugin -lStdPlugin -lTKAdvTools -lTKBin
-lTKBinL -lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKCDLFront -lTKC
PPClient -lTKCPPExt -lTKCPPIntExt -lTKCPPJini -lTKCSFDBSchema -lTKDCAF -lTKDraw
-lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR
-lTKIDLFront -lTKIGES -lTKLCAF -lTKMath -lTKMesh -lTKMeshVS -lTKOffset -lTKOpenG
l -lTKPCAF -lTKPLCAF -lTKPrim -lTKPShape -lTKService -lTKShapeSchema -lTKShHeali
ng -lTKStdLSchema -lTKStdSchema -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -
lTKSTL -lTKTCPPExt -lTKTopAlgo -lTKTopTest -lTKV2d -lTKV3d -lTKViewerTest -lTKVR
ML -lTKXCAF -lTKXCAFSchema -lTKXDEDRAW -lTKXDEIGES -lTKXDESTEP -lTKXml -lTKXmlL
-lTKXmlXCAF -lTKXSBase -lTKXSDRAW -lXCAFPlugin -lXmlLPlugin -lXmlPlugin -lXmlXCA
FPlugin -ltk -lXmu')

P Dolbey's picture

Rajesh,

Where is your CASROOT environment variable pointing to?

Pete

Rajesh Kishore's picture

Its in /home/Kishore/OCC/ros

P Dolbey's picture

The screen in missing the left character, but I assume the that what appears as "home/kishore..." is really "/home/kishore/...". There's some funny relative referencing in
"/home/kishore/QtOCC/../OCC/ros/inc" - I can't quite see how this has evolved from the CASROOT variable. I also noted the capitalisation of "K" in your previuos post - its this correct?

It would be useful to see the full gcc line if this shows the include directories used. Also a list of all env vars.

Was the make file created by qmake?

Rajesh Kishore's picture

O Sorry Pete, that was /home/kishore/OCC/ros
and make file is also generated

Rajesh Kishore's picture

The following is the error:
kishore@linux-hxi1:~/QtOCC> make
make -f Makefile.Release all
make[1]: Entering directory `/home/kishore/QtOCC'
g++ -o QtOCC release/View.o release/Viewer.o release/main.o release/Line.o release/mainwindow.o release/moc_View.o release/moc_Viewer.o release/moc_mainwindow.o -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -ldl -lpthread
release/View.o: In function `View::View(QWidget*)':
View.cpp:(.text+0x19b): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x1a3): undefined reference to `Handle_Standard_Transient::EndScope()'
release/View.o: In function `View::Initialize(Handle_AIS_InteractiveContext&, QApplication*)':
View.cpp:(.text+0x1de): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
View.cpp:(.text+0x1f2): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
View.cpp:(.text+0x202): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
View.cpp:(.text+0x214): undefined reference to `V3d_Viewer::CreateView()'
View.cpp:(.text+0x226): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
View.cpp:(.text+0x22e): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x264): undefined reference to `Viewer_Viewer::Device() const'
View.cpp:(.text+0x279): undefined reference to `Handle_Graphic3d_GraphicDevice::DownCast(Handle_Standard_Transient const&)'
View.cpp:(.text+0x288): undefined reference to `Standard::Allocate(unsigned int)'
View.cpp:(.text+0x2b9): undefined reference to `Xw_Window::Xw_Window(Handle_Xw_GraphicDevice const&, int, int, Xw_WindowQuality, Quantity_NameOfColor)'
View.cpp:(.text+0x2c8): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
View.cpp:(.text+0x2d3): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x2de): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x2f0): undefined reference to `V3d_View::SetBackgroundColor(Quantity_NameOfColor)'
View.cpp:(.text+0x301): undefined reference to `V3d_View::SetWindow(Handle_Aspect_Window const&)'
View.cpp:(.text+0x30c): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x31e): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x33a): undefined reference to `Standard::Free(void*&)'
View.cpp:(.text+0x345): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x350): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x35b): undefined reference to `Handle_Standard_Transient::EndScope()'
release/View.o: In function `View::~View()':
View.cpp:(.text+0x3a3): undefined reference to `Handle_Standard_Transient::EndScope()'
View.cpp:(.text+0x3ae): undefined reference to `Handle_Standard_Transient::EndScope()'
release/View.o:View.cpp:(.text+0x3d4): more undefined references to `Handle_Standard_Transient::EndScope()' follow
release/View.o: In function `View::paintEvent(QPaintEvent*)':
View.cpp:(.text+0x87): undefined reference to `V3d_View::Redraw() const'
release/Viewer.o: In function `Viewer::~Viewer()':
Viewer.cpp:(.text+0x8c): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x97): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0xa2): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0xc8): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0xd3): undefined reference to `Handle_Standard_Transient::EndScope()'
release/Viewer.o:Viewer.cpp:(.text+0x10c): more undefined references to `Handle_Standard_Transient::EndScope()' follow
release/Viewer.o: In function `Viewer::createViewer(char*, short*, char*, double)':
Viewer.cpp:(.text+0x214): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x229): undefined reference to `Standard::Allocate(unsigned int)'
Viewer.cpp:(.text+0x252): undefined reference to `Graphic3d_GraphicDevice::Graphic3d_GraphicDevice(char*, Xw_TypeOfMapping, int, unsigned int)'
Viewer.cpp:(.text+0x25e): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x26a): undefined reference to `Standard::Allocate(unsigned int)'
Viewer.cpp:(.text+0x2cd): undefined reference to `V3d_Viewer::V3d_Viewer(Handle_Aspect_GraphicDevice const&, short*, char*, double, V3d_TypeOfOrientation, Quantity_NameOfColor, V3d_TypeOfVisualization, V3d_TypeOfShadingModel, V3d_TypeOfUpdate, unsigned int, unsigned int, V3d_TypeOfSurfaceDetail)'
Viewer.cpp:(.text+0x305): undefined reference to `Standard::Free(void*&)'
release/Viewer.o: In function `Viewer::Viewer()':
Viewer.cpp:(.text+0x375): undefined reference to `TCollection_ExtendedString::TCollection_ExtendedString(char*)'
Viewer.cpp:(.text+0x380): undefined reference to `TCollection_ExtendedString::ToExtString() const'
Viewer.cpp:(.text+0x3c5): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x3cd): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x3d7): undefined reference to `V3d_Viewer::Init()'
Viewer.cpp:(.text+0x3e1): undefined reference to `V3d_Viewer::SetDefaultLights()'
Viewer.cpp:(.text+0x3eb): undefined reference to `V3d_Viewer::SetLightOn()'
Viewer.cpp:(.text+0x3fe): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x40a): undefined reference to `Standard::Allocate(unsigned int)'
Viewer.cpp:(.text+0x418): undefined reference to `AIS_InteractiveContext::AIS_InteractiveContext(Handle_V3d_Viewer const&)'
Viewer.cpp:(.text+0x427): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x432): undefined reference to `TCollection_ExtendedString::Destroy()'
Viewer.cpp:(.text+0x448): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x450): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x45b): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x483): undefined reference to `Standard::Free(void*&)'
Viewer.cpp:(.text+0x48e): undefined reference to `TCollection_ExtendedString::Destroy()'
Viewer.cpp:(.text+0x49b): undefined reference to `Handle_Standard_Transient::EndScope()'
release/Viewer.o: In function `Viewer::Viewer()':
Viewer.cpp:(.text+0x505): undefined reference to `TCollection_ExtendedString::TCollection_ExtendedString(char*)'
Viewer.cpp:(.text+0x510): undefined reference to `TCollection_ExtendedString::ToExtString() const'
Viewer.cpp:(.text+0x555): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x55d): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x567): undefined reference to `V3d_Viewer::Init()'
Viewer.cpp:(.text+0x571): undefined reference to `V3d_Viewer::SetDefaultLights()'
Viewer.cpp:(.text+0x57b): undefined reference to `V3d_Viewer::SetLightOn()'
Viewer.cpp:(.text+0x58e): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x59a): undefined reference to `Standard::Allocate(unsigned int)'
Viewer.cpp:(.text+0x5a8): undefined reference to `AIS_InteractiveContext::AIS_InteractiveContext(Handle_V3d_Viewer const&)'
Viewer.cpp:(.text+0x5b7): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
Viewer.cpp:(.text+0x5c2): undefined reference to `TCollection_ExtendedString::Destroy()'
Viewer.cpp:(.text+0x5d8): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x5e0): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x5eb): undefined reference to `Handle_Standard_Transient::EndScope()'
Viewer.cpp:(.text+0x613): undefined reference to `Standard::Free(void*&)'
Viewer.cpp:(.text+0x61e): undefined reference to `TCollection_ExtendedString::Destroy()'
Viewer.cpp:(.text+0x62b): undefined reference to `Handle_Standard_Transient::EndScope()'
release/Line.o: In function `Message_TraceFile::Out() const':
Line.cpp:(.text._ZNK17Message_TraceFile3OutEv[Message_TraceFile::Out() const]+0xe): undefined reference to `Message_OutFile::Out()'
release/Line.o: In function `Message_Printer::Out() const':
Line.cpp:(.text._ZNK15Message_Printer3OutEv[Message_Printer::Out() const]+0xe): undefined reference to `Message_OutFile::Out()'
release/Line.o: In function `Message_Printer::~Message_Printer()':
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x1c): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x27): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x2d): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x35): undefined reference to `Standard_Transient::~Standard_Transient()'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x43): undefined reference to `Standard::Free(void*&)'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x5a): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x60): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN15Message_PrinterD0Ev[Message_Printer::~Message_Printer()]+0x68): undefined reference to `Standard_Transient::~Standard_Transient()'
release/Line.o: In function `Message_Printer::~Message_Printer()':
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x1c): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x27): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x2d): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x4b): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x51): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x59): undefined reference to `Standard_Transient::~Standard_Transient()'
Line.cpp:(.text._ZN15Message_PrinterD1Ev[Message_Printer::~Message_Printer()]+0x3e): undefined reference to `Standard_Transient::~Standard_Transient()'
release/Line.o: In function `Message_TraceFile::~Message_TraceFile()':
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x18): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x29): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x34): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x3a): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x42): undefined reference to `Standard_Transient::~Standard_Transient()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x50): undefined reference to `Standard::Free(void*&)'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x6a): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x75): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x7b): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x83): undefined reference to `Standard_Transient::~Standard_Transient()'
Line.cpp:(.text._ZN17Message_TraceFileD0Ev[Message_TraceFile::~Message_TraceFile()]+0x9c): undefined reference to `Handle_Standard_Transient::EndScope()'
release/Line.o: In function `Message_TraceFile::~Message_TraceFile()':
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x1c): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x2d): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x38): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x3e): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x62): undefined reference to `TCollection_AsciiString::Destroy()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x6d): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x73): undefined reference to `vtable for MMgt_TShared'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x7b): undefined reference to `Standard_Transient::~Standard_Transient()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x94): undefined reference to `Handle_Standard_Transient::EndScope()'
Line.cpp:(.text._ZN17Message_TraceFileD1Ev[Message_TraceFile::~Message_TraceFile()]+0x4f): undefined reference to `Standard_Transient::~Standard_Transient()'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x10): undefined reference to `MMgt_TShared::Delete() const'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x14): undefined reference to `Standard_Transient::HashCode(int) const'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x18): undefined reference to `Standard_Transient::ShallowDump(std::basic_ostream >&) const'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x1c): undefined reference to `Message_TraceFile::DynamicType() const'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x20): undefined reference to `Standard_Transient::This() const'
release/Line.o:(.rodata._ZTV17Message_TraceFile[vtable for Message_TraceFile]+0x28): undefined reference to `Message_TraceFile::OwnSend(char*, Message_EndOfMsg) const'
release/Line.o:(.rodata._ZTV15Message_Printer[vtable for Message_Printer]+0x10): undefined reference to `MMgt_TShared::Delete() const'
release/Line.o:(.rodata._ZTV15Message_Printer[vtable for Message_Printer]+0x14): undefined reference to `Standard_Transient::HashCode(int) const'
release/Line.o:(.rodata._ZTV15Message_Printer[vtable for Message_Printer]+0x18): undefined reference to `Standard_Transient::ShallowDump(std::basic_ostream >&) const'
release/Line.o:(.rodata._ZTV15Message_Printer[vtable for Message_Printer]+0x1c): undefined reference to `Message_Printer::DynamicType() const'
release/Line.o:(.rodata._ZTV15Message_Printer[vtable for Message_Printer]+0x20): undefined reference to `Standard_Transient::This() const'
release/Line.o:(.rodata._ZTI15Message_Printer[typeinfo for Message_Printer]+0x8): undefined reference to `typeinfo for MMgt_TShared'
release/mainwindow.o: In function `MainWindow::assign()':
mainwindow.cpp:(.text+0xd9): undefined reference to `Handle_Standard_Transient::Assign(Standard_Transient const*)'
release/mainwindow.o: In function `MainWindow::newLine()':
mainwindow.cpp:(.text+0x1a1): undefined reference to `Handle_Standard_Transient::EndScope()'
mainwindow.cpp:(.text+0x1cd): undefined reference to `V3d_View::ZFitAll(double)'
mainwindow.cpp:(.text+0x1d8): undefined reference to `Handle_Standard_Transient::EndScope()'
mainwindow.cpp:(.text+0x214): undefined reference to `V3d_View::FitAll(double, unsigned int, unsigned int)'
mainwindow.cpp:(.text+0x21f): undefined reference to `Handle_Standard_Transient::EndScope()'
mainwindow.cpp:(.text+0x26b): undefined reference to `Handle_Standard_Transient::EndScope()'
mainwindow.cpp:(.text+0x280): undefined reference to `Handle_Standard_Transient::EndScope()'
mainwindow.cpp:(.text+0x28c): undefined reference to `Handle_Standard_Transient::EndScope()'
release/mainwindow.o: In function `MainWindow::MainWindow(QApplication*)':
mainwindow.cpp:(.text+0x6e4): undefined reference to `Handle_Standard_Transient::EndScope()'
release/mainwindow.o:mainwindow.cpp:(.text+0x6ef): more undefined references to `Handle_Standard_Transient::EndScope()' follow
collect2: ld returned 1 exit status
make[1]: *** [QtOCC] Error 1
make[1]: Leaving directory `/home/kishore/QtOCC'
make: *** [release-all] Error 2
kishore@linux-hxi1:~/QtOCC>

P Dolbey's picture

I can't see any refernce to -L$(CASROOT) or -L/home/kishore/OCC/lin/lib in the link commands. Do you want to upload the original qmake .pro/pri files you are using. We have had them running on both Unbuntu and Debian previuosly.

Pete