Assertion failed: (v->graphOf() == m_pGraph), function operator[], file /usr/local/include/ogdf/basic/NodeArray.h, line 184.
GA.x(left) = -5*(i+1);
make debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++
-- Check for working CXX compiler: /usr/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- CMAKE_C_COMPILER: /usr/local/bin/gcc
-- CMAKE_CXX_COMPILER: /usr/local/bin/g++
-- CMAKE_COMPILER_IS_GNUCC: 1
-- CMAKE_COMPILER_IS_GNUCXX : 1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dagoodma/asl/dubins_coverage_cpp/examples/build-debug
make
Scanning dependencies of target manual
[ 33%] Building CXX object CMakeFiles/manual.dir/manual.cpp.o
Linking CXX executable manual
[ 33%] Built target manual
Scanning dependencies of target random
[ 66%] Building CXX object CMakeFiles/random.dir/random.cpp.o
Linking CXX executable random
[ 66%] Built target random
Scanning dependencies of target sierpinski
[100%] Building CXX object CMakeFiles/sierpinski.dir/sierpinski.cpp.o
Linking CXX executable sierpinski
[100%] Built target sierpinski
./manual
Assertion failed: (v->graphOf() == m_pGraph), function operator[], file /usr/local/include/ogdf/basic/NodeArray.h, line 184.
Abort trap: 6
[ 33%] Building CXX object CMakeFiles/manual.dir/manual.cpp.o
/usr/local/bin/g++ -std=c++11 -g -I/usr/local/include/ogdf -I/usr/local/include/coin -o CMakeFiles/manual.dir/manual.cpp.o -c /Users/dagoodma/asl/dubins_coverage_cpp/examples/manual.cpp
Linking CXX executable manual
/usr/local/bin/g++ -std=c++11 -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/manual.dir/manual.cpp.o -o manual -lOGDF
cmake
makeMakefile.py
As you can see, there's not debug output here, just the failed assertion.
g++ -g -ggdb -pedantic -Wall -std=c++0x -c ../manual.cpp
g++ -g -o manual manual.o -static-libstdc++ -lOGDF -lCOIN
# CMakeListscmake_minimum_required(VERSION 3.1)project (EXAMPLES)
find_library(OGDF ogdf)find_library(COIN coin)
## Set c++11include(CheckCXXCompilerFlag)CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)if(COMPILER_SUPPORTS_CXX11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")else() message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")endif()
# Build and Link Executables
ADD_EXECUTABLE( manual manual.cpp )ADD_EXECUTABLE( random random.cpp )ADD_EXECUTABLE( sierpinski sierpinski.cpp )
TARGET_LINK_LIBRARIES( manual OGDF COIN )TARGET_LINK_LIBRARIES( random OGDF COIN )TARGET_LINK_LIBRARIES( sierpinski OGDF COIN )
# the compiler used for C filesMESSAGE( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
# the compiler used for C++ filesMESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
# if the compiler is a variant of gcc, this should be set to 1MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCC: " ${CMAKE_COMPILER_IS_GNUCC} )
# if the compiler is a variant of g++, this should be set to 1MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCXX : " ${CMAKE_COMPILER_IS_GNUCXX} )
#include <ogdf/basic/Graph.h>#include <ogdf/basic/GraphAttributes.h>#include <ogdf/fileformats/GraphIO.h>
using namespace ogdf;
int main(){ Graph G; GraphAttributes GA(G, GraphAttributes::nodeGraphics | GraphAttributes::edgeGraphics );
const int LEN = 11; for(int i = 1; i<LEN; ++i) { node left = G.newNode(); GA.x(left) = -5*(i+1); GA.y(left) = -20*i; GA.width(left) = 10*(i+1); GA.height(left) = 15;
node bottom = G.newNode(); GA.x(bottom) = 20*(LEN-i); GA.y(bottom) = 5*(LEN+1-i); GA.width(bottom) = 15; GA.height(bottom) = 10*(LEN+1-i);
edge e = G.newEdge(left,bottom); DPolyline &p = GA.bends(e); p.pushBack(DPoint(10,-20*i)); p.pushBack(DPoint(20*(LEN-i),-10)); }
GraphIO::writeGML(GA, "manual_graph.gml");
return 0;}
-static-libstdc++", have you tried adding the same option to the OGDF compilation?
# CMakeLists
cmake_minimum_required(VERSION 3.1)
project (EXAMPLES CXX)
## Set c++11
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
include_directories("~/workspace/OGDF/include")
link_directories("~/workspace/OGDF")
# Build and Link Executables
ADD_EXECUTABLE( manual manual.cpp )
TARGET_LINK_LIBRARIES( manual OGDF COIN )
# the compiler used for C files
MESSAGE( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
# the compiler used for C++ files
MESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
# if the compiler is a variant of gcc, this should be set to 1
MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCC: " ${CMAKE_COMPILER_IS_GNUCC} )
# if the compiler is a variant of g++, this should be set to 1
MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCXX : " ${CMAKE_COMPILER_IS_GNUCXX} )
Starting program: .../examples/ogdf/build-debug/manual
Unable to find Mach task port for process-id 71443: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
Unable to find Mach task port for process-id 71443: (os/kern) failure (0x5).
codesign -s ~/Desktop/lldb_codesign /usr/local/bin/gdb
build_debug franziska$ ./ogdfLayoutTest
Assertion failed: (v->graphOf() == m_pGraph), function operator[], file /Users/franziska/external_libraries/ogdf-2017-12-25/OGDF/include/ogdf/basic/NodeArray.h, line 172.
Abort trap: 6
...
[100%] Linking CXX static library libOGDF.a
[100%] Built target OGDF
include_directories("/Users/franziska/external_libraries/ogdf-2017-12-25/OGDF/include")
include_directories("/Users/franziska/external_libraries/ogdf-2017-12-25/ogdf-debug/include")
link_directories("/Users/franziska/external_libraries/ogdf-2017-12-25/ogdf-debug")
"cmake":
{
"build_folder": "/Users/franziska/ogdf_test/build_debug",
"command_line_overrides":
{
"CMAKE_BUILD_TYPE": "Debug"
},
"generator": "Unix Makefiles",
"windows":
{
"generator": "Visual Studio"
}
},
-- CMAKE_C_COMPILER:
-- CMAKE_CXX_COMPILER: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- CMAKE_COMPILER_IS_GNUCC:
-- CMAKE_COMPILER_IS_GNUCXX :
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/franziska/ogdf_test/build_debug
[Finished in 0.1s]
Scanning dependencies of target ogdfLayoutTest
[ 50%] Building CXX object CMakeFiles/ogdfLayoutTest.dir/src/runnables/ogdf_ManualCreateLayout.cpp.o
[100%] Linking CXX executable ogdfLayoutTest
[100%] Built target ogdfLayoutTest
[Finished in 1.6s]
make ex-manual && doc/examples/basic/ex-manual