DiscussionsIssue archiveInstallation and Building

Archived discussion

OCCT linking error

Installation and BuildingTue, 05/19/2020 - 12:502 replies

Browse this forum
QuestionAuthor

Whenever I link my code with opencascade 7.3.0 or 7.4.0 even when I don't use the library in my code I get more than 95 memory leaks and a segment fault on valgrind. I would like to know how this can be solved if its not a bug. Please see the image attached below.

 

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

How do you plan using libTKDraw (from callstack on your screenshots) in your application? To embed Tcl console into application user interface?

02Author

Yeah, you have a point there. I had planned to use it in a similar way but due to some design challenges I abandoned the path and forgot to change my make file like this one below :

find_package(Threads REQUIRED)
find_package(OpenCASCADE REQUIRED)

...
target_include_directories(hello PUBLIC ${Boost_INCLUDE_DIRS} ${OpenCASCADE_INCLUDE_DIR})
target_link_libraries(hello ${Boost_LIBRARIES} Threads::Threads ${OpenCASCADE_LIBRARIES})

Now I have reduced the libraries to those that my application requires but I have a "still reachable"  report stating that 16 bytes are in us at exit. Some say its benign but In case this can still be solved I will send the image .

set (OCCT_LIBS TKSTEP;TKIGES;TKXSBase;TKBRep;TKG3d;TKTopAlgo;TKMath;TKernel)
...
target_link_libraries(hello ${Boost_LIBRARIES} Threads::Threads ${OCCT_LIBS})

Hope it will help others :)

NB : I am not a make file guru!