compile errors on win7

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

compile errors on win7

Post by tilas »

Hi,
I am trying to compile the FC from scratch for the first time.
I have setup everything as described in wiki and unloaded the majority of the components, see here:viewtopic.php?f=4&t=1884.
Now I get the following errors:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: FreeCADBase, Configuration: Debug Win32 ------
2> dircoll.cpp
2>C:\FreeCADbuild\free-cad\trunk\src\zipios++\dircoll.cpp(137): error C2872: 'get' : ambiguous symbol
2> could be 'c:\freecadbuild\free-cad\trunk\src\zipios++\directory.h(70) : boost::filesystem::get'
2> or 'get'
2>C:\FreeCADbuild\free-cad\trunk\src\zipios++\dircoll.cpp(137): error C2872: 'get' : ambiguous symbol
2> could be 'c:\freecadbuild\free-cad\trunk\src\zipios++\directory.h(70) : boost::filesystem::get'
2> or 'get'
2>C:\FreeCADbuild\free-cad\trunk\src\zipios++\dircoll.cpp(141): error C2872: 'get' : ambiguous symbol
2> could be 'c:\freecadbuild\free-cad\trunk\src\zipios++\directory.h(70) : boost::filesystem::get'
2> or 'get'
2>C:\FreeCADbuild\free-cad\trunk\src\zipios++\dircoll.cpp(141): error C2872: 'get' : ambiguous symbol
2> could be 'c:\freecadbuild\free-cad\trunk\src\zipios++\directory.h(70) : boost::filesystem::get'
2> or 'get'
3>------ Build started: Project: FreeCADApp, Configuration: Debug Win32 ------
3> Application.cpp
3>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\Shfolder.h(14): fatal error C1189: #error : shfolder.h/shfolder.lib provide platform independence with versions prior to Windows 2000. Use shlobj.h/shell32.lib if targetting Windows 2000 or higher.
4>------ Build started: Project: FreeCADGui, Configuration: Debug Win32 ------
5>------ Build started: Project: Start, Configuration: Debug Win32 ------
5>LINK : fatal error LNK1104: cannot open file '..\..\..\App\Debug\FreeCADAppD.lib'
4>LINK : fatal error LNK1104: cannot open file '..\App\Debug\FreeCADAppD.lib'
6>------ Build started: Project: Sketcher, Configuration: Debug Win32 ------
7>------ Build started: Project: PartGui, Configuration: Debug Win32 ------
6> SubSystem.cpp
7>LINK : fatal error LNK1104: cannot open file '..\App\Debug\Part_d.lib'
8>------ Build started: Project: PartDesign, Configuration: Debug Win32 ------
8>LINK : fatal error LNK1104: cannot open file '..\..\Part\App\Debug\Part_d.lib'
9>------ Build started: Project: QtUnitGui, Configuration: Debug Win32 ------
6>C:\FreeCADbuild\free-cad\trunk\src\Mod\Sketcher\App\freegcs\SubSystem.cpp(65): error C2039: 'back_inserter' : is not a member of 'std'
6>C:\FreeCADbuild\free-cad\trunk\src\Mod\Sketcher\App\freegcs\SubSystem.cpp(65): error C3861: 'back_inserter': identifier not found
9>LINK : fatal error LNK1104: cannot open file '..\..\..\Gui\Debug\FreeCADGuiD.lib'
10>------ Build started: Project: FreeCADMainPy, Configuration: Debug Win32 ------
11>------ Build started: Project: FreeCADMainCmd, Configuration: Debug Win32 ------
10>LINK : fatal error LNK1104: cannot open file '..\App\Debug\FreeCADAppD.lib'
11>LINK : fatal error LNK1104: cannot open file '..\App\Debug\FreeCADAppD.lib'
12>------ Build started: Project: FreeCADMain, Configuration: Debug Win32 ------
13>------ Build started: Project: FreeCADGuiPy, Configuration: Debug Win32 ------
12>LINK : fatal error LNK1104: cannot open file '..\Gui\Debug\FreeCADGuiD.lib'
13>LINK : fatal error LNK1104: cannot open file '..\Gui\Debug\FreeCADGuiD.lib'
14>------ Build started: Project: SketcherGui, Configuration: Debug Win32 ------
15>------ Build started: Project: StartGui, Configuration: Debug Win32 ------
15>LINK : fatal error LNK1104: cannot open file '..\App\Debug\Start_d.lib'
16>------ Build started: Project: PartDesignGui, Configuration: Debug Win32 ------
14>LINK : fatal error LNK1104: cannot open file '..\App\Debug\Sketcher_d.lib'
16>LINK : fatal error LNK1104: cannot open file '..\App\Debug\PartDesign_d.lib'
17>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
17> Build all projects
========== Build: 2 succeeded, 15 failed, 1 up-to-date, 0 skipped ==========

Either I have unloaded too much, or there is some other problem... Can anybody assist?
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

Re: compile errors on win7

Post by tilas »

I have replaced the 'get' with 'boost::filesystem::get'
and commented out the

Code: Select all

# ifdef _MSC_VER
# include <Shfolder.h>
# endif
 
in the Aplication.cpp. Now I get the following:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: FreeCADApp, Configuration: Debug Win32 ------
2> Application.cpp
2>c:\freecadbuild\free-cad\trunk\src\zipios++\ziphead.h(182): warning C4244: 'return' : conversion from 'std::streamoff' to 'int', possible loss of data
2> Creating library C:/FreeCADbuild/FreeCAD/src/App/Debug/FreeCADAppD.lib and object C:/FreeCADbuild/FreeCAD/src/App/Debug/FreeCADAppD.exp
2>Application.obj : error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > boost::program_options::arg" (?arg@program_options@boost@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
2>C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADAppD.dll : fatal error LNK1120: 1 unresolved externals
3>------ Build started: Project: FreeCADGui, Configuration: Debug Win32 ------
4>------ Build started: Project: Start, Configuration: Debug Win32 ------
4> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Start/App/Debug/Start_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Start/App/Debug/Start_d.exp
4> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Start/App/Debug/Start_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Start/App/Debug/Start_d.exp
4> Start.vcxproj -> C:\FreeCADbuild\FreeCAD\Mod\Start\Debug\Start_d.pyd
3> Creating library C:/FreeCADbuild/FreeCAD/src/Gui/Debug/FreeCADGuiD.lib and object C:/FreeCADbuild/FreeCAD/src/Gui/Debug/FreeCADGuiD.exp
3> Creating library C:/FreeCADbuild/FreeCAD/src/Gui/Debug/FreeCADGuiD.lib and object C:/FreeCADbuild/FreeCAD/src/Gui/Debug/FreeCADGuiD.exp
3> FreeCADGui.vcxproj -> C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADGuiD.dll
5>------ Build started: Project: Sketcher, Configuration: Debug Win32 ------
6>------ Build started: Project: PartGui, Configuration: Debug Win32 ------
5> SubSystem.cpp
6>LINK : fatal error LNK1104: cannot open file '..\App\Debug\Part_d.lib'
7>------ Build started: Project: PartDesign, Configuration: Debug Win32 ------
7>LINK : fatal error LNK1104: cannot open file '..\..\Part\App\Debug\Part_d.lib'
8>------ Build started: Project: QtUnitGui, Configuration: Debug Win32 ------
8> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Test/Gui/Debug/QtUnitGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Test/Gui/Debug/QtUnitGui_d.exp
5>C:\FreeCADbuild\free-cad\trunk\src\Mod\Sketcher\App\freegcs\SubSystem.cpp(65): error C2039: 'back_inserter' : is not a member of 'std'
5>C:\FreeCADbuild\free-cad\trunk\src\Mod\Sketcher\App\freegcs\SubSystem.cpp(65): error C3861: 'back_inserter': identifier not found
8> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Test/Gui/Debug/QtUnitGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Test/Gui/Debug/QtUnitGui_d.exp
8> QtUnitGui.vcxproj -> C:\FreeCADbuild\FreeCAD\Mod\Test\Debug\QtUnitGui_d.pyd
9>------ Build started: Project: FreeCADMainPy, Configuration: Debug Win32 ------
9> Creating library C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCAD_d.lib and object C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCAD_d.exp
10>------ Build started: Project: FreeCADMainCmd, Configuration: Debug Win32 ------
9> Creating library C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCAD_d.lib and object C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCAD_d.exp
9> FreeCADMainPy.vcxproj -> C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCAD_d.pyd
10> FreeCADMainCmd.vcxproj -> C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADCmdD.exe
11>------ Build started: Project: FreeCADMain, Configuration: Debug Win32 ------
12>------ Build started: Project: FreeCADGuiPy, Configuration: Debug Win32 ------
11>qtmaind.lib(qtmain_win.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with 'qtmaind.lib(qtmain_win.obj)' or at 'C:\FreeCADbuild\FreeCAD\bin\Debug\vc90.pdb'; linking object as if no debug info
12> Creating library C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCADGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCADGui_d.exp
11> FreeCADMain.vcxproj -> C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADD.exe
13>------ Build started: Project: SketcherGui, Configuration: Debug Win32 ------
12> Creating library C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCADGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Main/Debug/FreeCADGui_d.exp
12> FreeCADGuiPy.vcxproj -> C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADGui_d.pyd
14>------ Build started: Project: StartGui, Configuration: Debug Win32 ------
14> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Start/Gui/Debug/StartGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Start/Gui/Debug/StartGui_d.exp
14> Creating library C:/FreeCADbuild/FreeCAD/src/Mod/Start/Gui/Debug/StartGui_d.lib and object C:/FreeCADbuild/FreeCAD/src/Mod/Start/Gui/Debug/StartGui_d.exp
14> StartGui.vcxproj -> C:\FreeCADbuild\FreeCAD\Mod\Start\Debug\StartGui_d.pyd
15>------ Build started: Project: PartDesignGui, Configuration: Debug Win32 ------
13>LINK : fatal error LNK1104: cannot open file '..\App\Debug\Sketcher_d.lib'
15>LINK : fatal error LNK1104: cannot open file '..\App\Debug\PartDesign_d.lib'
16>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
16> Build all projects
========== Build: 10 succeeded, 6 failed, 2 up-to-date, 0 skipped ==========
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: compile errors on win7

Post by wmayer »

Which version of VS d you use? Try using VS2008.
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

Re: compile errors on win7

Post by tilas »

I use VC++ 2010 express (SP1).
OK, I have removed the BUILD_ALL and ZERO_CHECK and reloaded the Part, PartDesign and their GUIs. Still won't compile. Same errors as before. Do you think it could be VS2010 vs VS2008?
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: compile errors on win7

Post by wmayer »

Are these all error messages you get? For the back_inserter error try #include <iterator>.
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

Re: compile errors on win7

Post by tilas »

and what about this one?
tilas wrote:2>Application.obj : error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > boost::program_options::arg" (?arg@program_options@boost@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
2>C:\FreeCADbuild\FreeCAD\bin\Debug\FreeCADAppD.dll : fatal error LNK1120: 1 unresolved externals
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

Re: compile errors on win7

Post by tilas »

Well, I have installed the VC++2008 express and tried to run the Cmake again. here is what I get:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
COIN3D_INCLUDE_DIR
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/3rdParty/Pivy
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Main
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Points/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Complete/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Image/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Mesh/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Part/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/PartDesign/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Raytracing/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Drawing/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Sketcher/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Robot/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/ReverseEngineering/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/MeshPart/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Web/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Start/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Import/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Inspection/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Mod/Fem/Gui
used as include directory in directory C:/FreeCADbuild/free-cad/trunk/src/Gui
COIN3D_LIBRARY_DEBUG
linked by target "coin" in directory C:/FreeCADbuild/free-cad/trunk/src/3rdParty/Pivy
linked by target "soqt" in directory C:/FreeCADbuild/free-cad/trunk/src/3rdParty/Pivy
linked by target "FreeCADGui" in directory C:/FreeCADbuild/free-cad/trunk/src/Gui
COIN3D_LIBRARY_RELEASE
linked by target "coin" in directory C:/FreeCADbuild/free-cad/trunk/src/3rdParty/Pivy
linked by target "soqt" in directory C:/FreeCADbuild/free-cad/trunk/src/3rdParty/Pivy
linked by target "FreeCADGui" in directory C:/FreeCADbuild/free-cad/trunk/src/Gui


When I ran the Cmake against the VC2010 it marked the Coin3 as "not found", but did not issue these errors.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: compile errors on win7

Post by wmayer »

In App/Application.cpp line 1282:

Code: Select all

#if (defined(_MSC_VER) && (_MSC_VER < 1600))
Maybe you have to increase to 1800, i.e:

Code: Select all

#if (defined(_MSC_VER) && (_MSC_VER < 1800))
tilas
Posts: 81
Joined: Mon Oct 31, 2011 3:44 pm

Re: compile errors on win7

Post by tilas »

Werner, thank a lot. these two changes (the #include and the 1800) have made the VC2010 setup compile with only one warning:

1> Application.cpp
1>c:\freecadbuild\free-cad\trunk\src\zipios++\ziphead.h(182): warning C4244: 'return' : conversion from 'std::streamoff' to 'int', possible loss of data

To summarize the setup and changes needed till now:
Win7x64, VC++2010 SP1 Express, setup as per wiki with libpack and Cmake.
Changes:
1. in the ...\src\zipios++\dircoll.cpp lines 137 and 14:1 substitute 'get' with 'boost::filesystem::get'
2. in the ...\FreeCADApp\Aplication.cpp: comment the

Code: Select all

# ifdef _MSC_VER
# include <Shfolder.h>
# endif
3. in the ...\Mod\Sketcher\App\freegcs\SubSystem.cpp: #include <iterator>
4. in the ...\FreeCADApp\/Application.cpp line 1282: increase the value from 1600 to 1800

Code: Select all

#if (defined(_MSC_VER) && (_MSC_VER < 1800))
Update: compile successful, but can't start/debug the application.. Getting an Error: "Unable to start Program: ...\bin\debug\FreeCADAppD.dll"
Any thoughts?
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: compile errors on win7

Post by wmayer »

In the context-menu of the active project go to the Debugging section and set the path to the FreeCADD.exe file. If it still doesn't work make sure that Libpack/bin is in your system path, so that Windows can load the DLLs.
Post Reply