XCAFApp plugin looks for wrong library on MINGW-W64

Good Morning,

  I have built the OCC libraries using MINGW-W64 within MSYS2-W64 shell. My application is also built in the same environment.

The application crashed when calling XCAFApp_Application::Open ( const TCollection_ExtendedString & path, Handle< TDocStd_Document > & aDoc ).

The document was of type: "XmlXCAF"

An Errror message said that TKXmlXCAF.dll could not be found.  Indeed this library is named "libTKXmlXCAF.dll" (with lib prefix) on a MINGW platform.

The problem was solved making a copy of "libTKXmlXCAF.dll" named "TKXmlXCAF.dll" and my application is not crashing anymore.

But I think that it would be better to fix the plugin so that it looks for "libTKXmlXCAF.dll" when the OCC library is built with the MINGW compiler.

 

Walter Steffè

 

 

 

Kirill Gavrilov's picture

You are welcome providing patches to OCCT:
https://dev.opencascade.org/index.php?q=home/get_involved

Note that since OCCT 7.1.0, plugin mechanism is optional for using OCAF persistence - you can link to these libraries directly instead of dynamic loading via generated library name,
see OCCT 7.1.0 Release Notes for details "OCAF persistence without plugins".

Walter Steffè's picture

Hello Kirill, many thanks for your advice.

Following it I have excluded the plugin by callling "app->DefineFormat ( ..)".   So I do not need anymore to copy Resources and to define environment variables inside of the installer.