FreeCAD with OCCT 7.1.0 - Compile Error

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

FreeCAD with OCCT 7.1.0 - Compile Error

Post by ulrich1a »

I tried to compile FreeCAD with OCCT 7.1.0 under Debian Jessie. I had to copy the file Standard_Version.hxx from the source into the include directory, because Cmake gave errors with the original file Standard_Version.hxx, which contained only an include statement.
But then I got the following error, which I could not fix:

Code: Select all

/home/ulrich/Sourcen/FreeCAD/FreeCAD_sf_master/src/Mod/Part/App/TopoShape.cpp: In member function ‘void Part::TopoShape::exportStep(const char*) const’:
/home/ulrich/Sourcen/FreeCAD/FreeCAD_sf_master/src/Mod/Part/App/TopoShape.cpp:667:23: error: ‘class XSControl_WorkSession’ has no member named ‘MapWriter’
         aWriter.WS()->MapWriter()->SetProgress(pi);
                       ^
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:3042: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/TopoShape.cpp.o' failed
make[2]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/TopoShape.cpp.o] Error 1
CMakeFiles/Makefile2:1656: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/all' failed
make[1]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
Any ideas?

Ulrich
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by triplus »

Hi Ulrich.

I had to do the same as if i remember correctly they use symlink in Standard_Version.hxx file. Probably something worth reporting to them.

As for the second issue i just commented out the line in TopoShape.cpp. This is probably something we will need to properly address in the future.

P.S. Beyond that you shouldn’t get any other issues.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by wmayer »

The OCC sources have been modified in this commit

Code: Select all

-  //! Returns the FinderProcess (internal data for TransferWriter)
-  Standard_EXPORT Handle(Transfer_FinderProcess) MapWriter() const;
+  const Handle(XSControl_TransferWriter) & TransferWriter() const
+  { return myTransferWriter; }
So, you should get it working with

Code: Select all

#if OCC_VERSION_HEX >= 0x070100
        aWriter.WS()->TransferWriter()->SetProgress(pi);
#else
        aWriter.WS()->MapWriter()->SetProgress(pi);
#endif
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by ulrich1a »

wmayer wrote:So, you should get it working with
It seems to be a little more complex. I now get:

Code: Select all

/home/ulrich/Sourcen/FreeCAD/FreeCAD_sf_master/src/Mod/Part/App/TopoShape.cpp: In member function ‘void Part::TopoShape::exportStep(const char*) const’:
/home/ulrich/Sourcen/FreeCAD/FreeCAD_sf_master/src/Mod/Part/App/TopoShape.cpp:668:49: error: ‘class XSControl_TransferWriter’ has no member named ‘SetProgress’
                 aWriter.WS()->TransferWriter()->SetProgress(pi);
                                                 ^
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:3042: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/TopoShape.cpp.o' failed
Ulrich
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by wmayer »

I see, the new method returns a different type. It appeared that MapWriter is a convenience method and there is a way to make it source compatible to occ 7.1 and older. See git commit 4130f84
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by ulrich1a »

wmayer wrote:See git commit 4130f84
Thanks, compiles now.

Ulrich
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by NormandC »

Mods,

Have you not noticed that "ThomasTedsmall" has posted two utterly nonsense replies to two different topics and therefore must be some kind of spammer?

And I'm pretty sure I reported the afore mentioned reply already. :roll:
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by danielfalck »

NormandC wrote:Mods,

Have you not noticed that "ThomasTedsmall" has posted two utterly nonsense replies to two different topics and therefore must be some kind of spammer?

And I'm pretty sure I reported the afore mentioned reply already. :roll:
Ok. "ThomasTedsmall" is banned.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD with OCCT 7.1.0 - Compile Error

Post by sgrogan »

Now on Windows
OCCT 7.1 89aebde with TBB. Built and Installed, then copy/replace the libs over the 11.5.2 libpack
FreeCAD compilation,

Code: Select all

Error	1	error C2511: 'int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement *,opencascade::handle<TColgp_HArray1OfPnt> &,opencascade::handle<TColgp_HArray1OfVec> &,std::vector<const SMDS_MeshNode *,std::allocator<_Ty>> &,gp_Pnt &,gp_Vec &,const SMDS_MeshElement **)' : overloaded member function not found in 'StdMeshers_QuadToTriaAdaptor'	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	600	1	StdMeshers
Error	2	error C2228: left of '.begin' must have class/struct/union	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	635	1	StdMeshers
Error	3	error C2228: left of '.end' must have class/struct/union	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	637	1	StdMeshers
Error	4	error C2228: left of '.push_back' must have class/struct/union	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	648	1	StdMeshers
Error	5	error C2664: 'int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement *,Handle_TColgp_HArray1OfPnt &,Handle_TColgp_HArray1OfVec &,std::vector<const SMDS_MeshNode *,std::allocator<_Ty>> &,gp_Pnt &,gp_Vec &,const SMDS_MeshElement **)' : cannot convert argument 2 from 'opencascade::handle<TColgp_HArray1OfPnt>' to 'Handle_TColgp_HArray1OfPnt &'	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	767	1	StdMeshers
Error	6	error C2664: 'int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement *,Handle_TColgp_HArray1OfPnt &,Handle_TColgp_HArray1OfVec &,std::vector<const SMDS_MeshNode *,std::allocator<_Ty>> &,gp_Pnt &,gp_Vec &,const SMDS_MeshElement **)' : cannot convert argument 2 from 'opencascade::handle<TColgp_HArray1OfPnt>' to 'Handle_TColgp_HArray1OfPnt &'	C:\Users\Chris\GitHub\FreeCAD\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp	960	1	StdMeshers
Error	7	error C2556: 'opencascade::handle<Geom_BSplineSurface> Reen::ParameterCorrection::CreateSurface(const TColgp_Array1OfPnt &,int,bool,double)' : overloaded function differs only by return type from 'Handle_Geom_BSplineSurface Reen::ParameterCorrection::CreateSurface(const TColgp_Array1OfPnt &,int,bool,double)'	C:\Users\Chris\GitHub\FreeCAD\src\Mod\ReverseEngineering\App\ApproxSurface.cpp	722	1	ReverseEngineering
Error	8	error C2371: 'Reen::ParameterCorrection::CreateSurface' : redefinition; different basic types	C:\Users\Chris\GitHub\FreeCAD\src\Mod\ReverseEngineering\App\ApproxSurface.cpp	722	1	ReverseEngineering
Error	9	error LNK1181: cannot open input file '..\App\Release\ReverseEngineering.lib'	C:\Users\Chris\GitHub\FreeCAD-master-occt7.1-build\src\Mod\ReverseEngineering\Gui\LINK	ReverseEngineeringGui
Error	10	error LNK1181: cannot open input file '..\..\..\..\lib\Release\StdMeshers.lib'	C:\Users\Chris\GitHub\FreeCAD-master-occt7.1-build\src\Mod\MeshPart\App\LINK	MeshPart
Error	11	error LNK1181: cannot open input file '..\..\..\..\lib\Release\StdMeshers.lib'	C:\Users\Chris\GitHub\FreeCAD-master-occt7.1-build\src\Mod\Fem\App\LINK	Fem
Error	12	error LNK1181: cannot open input file '..\App\Release\MeshPart.lib'	C:\Users\Chris\GitHub\FreeCAD-master-occt7.1-build\src\Mod\MeshPart\Gui\LINK	MeshPartGui
Error	13	error LNK1181: cannot open input file '..\App\Release\Fem.lib'	C:\Users\Chris\GitHub\FreeCAD-master-occt7.1-build\src\Mod\Fem\Gui\LINK	FemGui
So it's in SMESH?
"fight the good fight"
Post Reply