Hi All,
We use msvc to compile FreeCAD(commit: git commit dcf2bc4), and it reported error C2036: 'TechDraw::LineSet *': unknown size (compiling source file F:\gitP\FreeCAD\FreeCAD\src\Mod\TechDraw\App\AppTechDraw.cpp). Could anyone help to look at this issue? Thanks.
Repro steps:
1. open VS2019 x64 tools command
2. git clone https://github.com/FreeCAD/FreeCAD.git F:\gitP\FreeCAD\FreeCAD
3. download https://github.com/apeltauer/FreeCAD/re ... ack_12.5.2 F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17
4. mkdir F:\gitP\FreeCAD\FreeCAD\build_amd64 && cd F:\gitP\FreeCAD\FreeCAD\build_amd64
5. set _CL_= /permissive- or set _CL_= /std:c++latest
6. set PATH=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17\bin;%PATH%
7. set PATH=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17\bin\Scripts;%PATH%
8. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DFREECAD_LIBPACK_DIR=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17 -DBUILD_FEM_NETGEN=OFF -DFREECAD_RELEASE_PDB=OFF -DFREECAD_RELEASE_SEH=OFF -DCMAKE_BUILD_TYPE=Release.
9. msbuild /m /p:Platform=x64 /p:Configuration=Release FreeCAD.sln /t:Rebuild
More info:
OS Version: windows server 2019
VS version: VS2019 (16.11.18)
msvc version: 19.31.31009.95 (msvc inner latest build)
FreeCAD failed to build with error C2036 on MSVC
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: FreeCAD failed to build with error C2036 on MSVC
At first in general, please always follow as exactly as possible our compilation instructions:
https://wiki.freecadweb.org/Compile_on_Windows
This avoids unnecessary troubles one can easily get because of 3rd-parts libraries, CMake settings etc.
Concerning your issue
- could you compile before without problems? If so, what is the commit that introduced the problems for you?
- can you please post the full error message you get here?
https://wiki.freecadweb.org/Compile_on_Windows
This avoids unnecessary troubles one can easily get because of 3rd-parts libraries, CMake settings etc.
Concerning your issue
- could you compile before without problems? If so, what is the commit that introduced the problems for you?
- can you please post the full error message you get here?
Re: FreeCAD failed to build with error C2036 on MSVC
Your version is too old. The issue has been fixed with git commit 8b4e114b9d