martcram / FreeCAD-APLAN

Assembly PLANning workbench for FreeCAD
GNU Lesser General Public License v2.1
5 stars 0 forks source link

Error compiling #10

Open FBarrca opened 3 weeks ago

FBarrca commented 3 weeks ago

Hello,

We are trying to compile the repository to test the tool for our usecase, but we are getting compile errors. FreeCAD compiles, but not the APLAN module. Would really appreciate it if you could take a look at the error, as your project seemed perfect to build upon for my thesis. Thanks!

Built with

Windows 11
FreeCAD: 20.2
LibPack(Dependencies): LibPack-OCC76-V2-8.7
Aplan: latest code of the repo

Couldn't find the exact versions of all the libraries in the repo, but used the latest official dependency pack for windows for FreeCAD 20.2

Errors

The errors seem to all revolve around the Part Compound

"C:\fc\freecad-build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj" (default target) (55) ->
(Link target) ->
  AplanCompound.obj : error LNK2019: unresolved external symbol "protected: static struct App::PropertyData const * __cdecl Part::Compound::getPropertyDataPtr(void)" (?getPropertyDataPtr@Compound@Part@@KAPEBU
PropertyData@App@@XZ) referenced in function "public: static void __cdecl Aplan::Compound::init(void)" (?init@Compound@Aplan@@SAXXZ) [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
  AplanCompound.obj : error LNK2019: unresolved external symbol "public: __cdecl Part::Compound::Compound(void)" (??0Compound@Part@@QEAA@XZ) referenced in function "public: __cdecl App::FeaturePythonT<class A
plan::Compound>::FeaturePythonT<class Aplan::Compound>(void)" (??0?$FeaturePythonT@VCompound@Aplan@@@App@@QEAA@XZ) [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
  AplanCompound.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl Part::Compound::~Compound(void)" (??1Compound@Part@@UEAA@XZ) referenced in function "public: virtual __cdecl App::Featu
rePythonT<class Aplan::Compound>::~FeaturePythonT<class Aplan::Compound>(void)" (??1?$FeaturePythonT@VCompound@Aplan@@@App@@UEAA@XZ) [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
  AplanCompound.obj : error LNK2019: unresolved external symbol "public: virtual short __cdecl Part::Compound::mustExecute(void)const " (?mustExecute@Compound@Part@@UEBAFXZ) referenced in function "public: vi
rtual short __cdecl App::FeaturePythonT<class Aplan::Compound>::mustExecute(void)const " (?mustExecute@?$FeaturePythonT@VCompound@Aplan@@@App@@UEBAFXZ) [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
  AplanCompound.obj : error LNK2019: unresolved external symbol "public: virtual class App::DocumentObjectExecReturn * __cdecl Part::Compound::execute(void)" (?execute@Compound@Part@@UEAAPEAVDocumentObjectExe
cReturn@App@@XZ) referenced in function "public: virtual class App::DocumentObjectExecReturn * __cdecl App::FeaturePythonT<class Aplan::Compound>::execute(void)" (?execute@?$FeaturePythonT@VCompound@Aplan@@@A
pp@@UEAAPEAVDocumentObjectExecReturn@2@XZ) [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
  C:\fc\freecad-build\Mod\Aplan\Aplan.pyd : fatal error LNK1120: 5 unresolved externals [C:\fc\freecad-build\src\Mod\Aplan\App\Aplan.vcxproj]
FBarrca commented 3 weeks ago

Got it to work using WSL. There is an issue with the exporting of the functions on Windows, as they are handled different to on Linux.