Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Installation and building / Link Error with STEPControl_Reader in importexport sample

Link Error with STEPControl_Reader in importexport sample

Link Error with STEPControl_Reader in importexport sample
Yang Jianxin 2012/02/08 18:01
I try to compile the importexport sample coming with OpenCASCADE 6.5 using Visual
Studio 2010 with Qt 4.8.0, however i met following link errors:

Translate.obj : error LNK2019: unresolved external symbol "public: unsigned int
__thiscall STEPControl_Reader::TransferRoot(int)" (?TransferRoot@STEPControl_Rea
der@@QAEIH@Z) referenced in function "private: class Handle_TopTools_HSequenceOf
Shape __thiscall Translate::importSTEP(class QString const &)" (?importSTEP@Tran
Translate.obj : error LNK2019: unresolved external symbol "public: virtual int _
_thiscall STEPControl_Reader::NbRootsForTransfer(void)" (?NbRootsForTransfer@STE
PControl_Reader@@UAEHXZ) referenced in function "private: class Handle_TopTools_
HSequenceOfShape __thiscall Translate::importSTEP(class QString const &)" (?impo

I have checked the link libraries, "-lTKStep -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKXSBase" are in the list. I also add all OCC libraries to the list, however
the error remains. I switch the STEPControl_Reader to IGESControl_Reader, there
is no such problem. Would you please give the suggestions? Thanks.
Yang Jianxin 2012/02/14 02:17
I found the problem, it is a bug of Qt.
In the, it defines "-lTKStep -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKXSBase", however the
generated Makefile contains two "-lTKSTEP209.lib", i have to change one into "-lTKStep.lib", thus it works.
coustet 2012/02/14 10:37
A workaround is to use QMAKE_LFLAGS += @liblist.txt, with all the lib names in liblist.txt.
See the documentation for "LINK Command Files" in MSDN.
Benjamin Bihler 2013/03/21 14:59
Another workaround can be to specify the library including the .lib file extension for Windows systems like this:

win32:LIBS += $$quote($${QMAKE_LIBDIR}/TKStep.lib)

This works great for me.
P Dolbey 2012/02/14 10:59
Not so much a bug as a "feature" - when you specify a lib like -lTKStep, qmake searches for the "latest" version of that lib by checking for a numeric version suffix on the libname and uses that in the makefile. In this case that method thinks its found version "209".

Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map