View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002145 | Assembly | Bug | public | 2015-06-03 11:40 | 2016-04-18 23:25 |
| Reporter | Psirus | Assigned To | ian.rees | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| OS | Arch Linux | ||||
| Summary | 0002145: 'nullptr' was not declared in this scope | ||||
| Description | I was trying to compile the jriegel/dev-assembly2 branch to evaluate the current state of the assembly module. However, the compilation fails on my machine (Linux 4.0.4, gcc 5.1.0) with the following error: Scanning dependencies of target FreeCADApp [ 13%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/Application.cpp.o Linking CXX shared library ../../lib/libFreeCADApp.so [ 14%] Built target FreeCADApp [ 14%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/Document.cpp.o In file included from /home/psirus/Code/AUR/freecad/freecad-git/src/freecad/src/Gui/Document.cpp:48:0: /home/psirus/Code/AUR/freecad/freecad-git/src/freecad/src/Gui/SoObjectSeparator.h:48:47: error: 'nullptr' was not declared in this scope SoObjectSeparator(Gui::ViewProvider *vp = nullptr); ^ src/Gui/CMakeFiles/FreeCADGui.dir/build.make:1170: recipe for target 'src/Gui/CMakeFiles/FreeCADGui.dir/Document.cpp.o' failed make[2]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/Document.cpp.o] Error 1 CMakeFiles/Makefile2:4129: recipe for target 'src/Gui/CMakeFiles/FreeCADGui.dir/all' failed make[1]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/all] Error 2 | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
add_c11_flag.patch (596 bytes)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 118d65e..f4cfa43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
include(cMake/ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
add_definitions(-DHAVE_CONFIG_H)
+ add_definitions(-std=c++11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-write-strings")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
# get linker errors as soon as possible and not at runtime e.g. for modules
|
|
|
I've read in the forum that the assembly module uses the new C++11 standard, and a corresponding flag needs to be passed to gcc. The patch adds this flag to CMakeLists.txt for the gcc. With it, it compiles on my machine. |
|
|
We're using C++11 in FreeCAD now. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-06-03 11:40 | Psirus | New Issue | |
| 2015-06-11 12:06 | Psirus | File Added: add_c11_flag.patch | |
| 2015-06-11 12:07 | Psirus | Note Added: 0006198 | |
| 2015-06-11 12:08 | Psirus | Note Edited: 0006198 | |
| 2016-04-18 23:25 | ian.rees | Note Added: 0006989 | |
| 2016-04-18 23:25 | ian.rees | Status | new => closed |
| 2016-04-18 23:25 | ian.rees | Assigned To | => ian.rees |
| 2016-04-18 23:25 | ian.rees | Resolution | open => fixed |
FreeCAD