failed to compile FreeCAD with windows

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: failed to compile FreeCAD with windows

Post by sgrogan »

easyw-fc wrote: Mon Jul 10, 2017 9:31 pm Then I deleted recursively all *.pdb files and the file size is much more reasonable, still almost the double of github releases ...
In the bin folder you can delete the debug .dll's also. They have either a d or _d, _D, or gd in the file name.
If you know powershell you can get some ideas from here: https://github.com/peterlama/FCAutoBuil ... #L121-L149
I'm working on an update but it's not ready for prime time yet.
"fight the good fight"
ruuaitro
Posts: 9
Joined: Sat Dec 16, 2017 12:08 pm

Re: failed to compile FreeCAD with windows

Post by ruuaitro »

Your correct that the instruction need some love. Maybe some could try this to see if I've missed anything? If it is clear it can be the basis of a wiki update.

Code: Select all

1) Download and install git. The latest version is available here: https://git-scm.com/download/win
Allow the installer to add git to your system PATH
2) Download and install Cmake. The latest version is available here: https://cmake.org/download/
Any version >3.4 should work except 3.5.0 which has a known bug.
3) Download and install VS2013 CE. The latest version is available here: https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs
Note: VS2013 is VC12
4) Download and install 7zip. The latest version is available here: http://www.7-zip.org/download.html
5) Clone the FreeCAD GitHub repository
“git clone https://github.com/FreeCAD/FreeCAD.git free-cad-code”
6) To compile FreeCAD master (i.e. trunk) the 11.5 series of the Libpack is required. Do to additional dependencies added in the 0.17 development cycle, this is a work in progress. A working copy is available here: https://github.com/sgrogan/FreeCAD/releases/tag/0.17-med-test
For 64 bit systems download “FreeCADLibs_11.5.2_x64_VC12.7z “ and extract it using 7zip.
7) Start the Cmake gui.
8) Enter the path to the source code in the “Where is the source code:” field
9) Enter the path to where you would like to build the binaries in the “Where to build the binaries:” field. Make sure to choose a location where you have write access (i.e. DoNot choose a location that requires Admin privileges) and that is not in the FreeCAD source tree.
10) Click “Configure” in CMake, CMake will ask to create the new build directory, accept this. Next Cmake will ask to specify the generator make sure to choose “Visual Studio 12 2013 Win64” CMake will fail.
11) Un-check “BUILD_FEM_NETGEN” in  Cmake.
Change the “FREECAD_LIBPACK_DIR” to the path where you extracted the libpack.  If you extracted it in your Downloads folder it will look like this: “C:\Users\USERNANE\Downloads\FreeCADLibs_11.5.2_x64_VC12”
12) Click “Configure” There will be some warning about Doxgen, but no errors.
13) Click “Generate” This should succeed. Close the Cmake gui.
14) Copy the bin subdirectory to the root of the build folder.
15) Navigate to the build directory and double click on FreeCAD_trunk.sln
The Visual Studio IDE should open and load the project. This may take some time based on your system.
16) There will be 2 drop downs in the VS toolbar menu. Change Debug to Release.
Click the dropdown for Win32 and “Configuration Manager...” From the “Active solution  platform” dropdown choose new, then from the “Type or select the new platform” dropdown select “x64” Close all sub-menus.
17) From the VS menu choose Build > Build Solution
Wait for FreeCAD to build. You should get 82 successful projects and 4 skipped. Close Visual Studio.
18) Navigate to the bin sub-directory of the build folder and start FreeCAD by double clicking on FreeCAD.exe.
I do this with this version of library : https://github.com/sgrogan/FreeCAD/rele ... 64_VC12.7z
and create successfully FreeCAD.exe in bin folder
but when i click on it , there is nothing to do .
what wrong ?

please help me :(
thanks .
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: failed to compile FreeCAD with windows

Post by sgrogan »

ruuaitro wrote: Sat Dec 16, 2017 12:19 pm please help me :(
Hello ruuaitro! Welcome to FreeCAD and the Forum :)

Have you successfully run FreeCAD on your system before?
You can try to start FreeCAD from the cmd line using

Code: Select all

freecad -l
This will write a log file to %appdata%/freecad, maybe this will offer some clues.
"fight the good fight"
Oli
Posts: 7
Joined: Wed Oct 05, 2016 3:04 pm

Re: failed to compile FreeCAD with windows

Post by Oli »

Hello everyone,
i tried to build FreeCAD, but it failed.
I have used the current version available (2017-12-21) with libpack 11.5.3 and cmake 3.9.3 no problems to this point.
But when I try to build it with VS 2013 Prof. I get 1587 errors. Most of them somehow related to "TopTools", "StandardTransient" and "opencascade"
Can anyone help me? What did I do wrong?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: failed to compile FreeCAD with windows

Post by sgrogan »

Oli wrote: Thu Dec 21, 2017 9:39 pm Can anyone help me? What did I do wrong?
Hey Oli,
Did you switch to a release build in VS?
A screenshot or log of the first few errors, might help. Which version of Windows?
"fight the good fight"
Oli
Posts: 7
Joined: Wed Oct 05, 2016 3:04 pm

Re: failed to compile FreeCAD with windows

Post by Oli »

I found it.
I forgot to uncheck FEM_Netgen in CMake.
Now I have only one error left.
QOpenGLDebugMessage cannot be found (include) in ImageGui.
Last edited by Oli on Thu Dec 28, 2017 11:32 pm, edited 1 time in total.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: failed to compile FreeCAD with windows

Post by sgrogan »

Oli wrote: Sun Dec 24, 2017 12:47 pm Log of the first 100 Errors:
Where did you get the sources? Looks line an old snapshot?
"fight the good fight"
Post Reply