From: Christian <cp...@gm...> - 2013-12-08 17:29:33
|
Hi folks, I am just new to this mailinglist and just exploring the library a bit. I tried compiling lib2geom-0.2.0 on Ubuntu 12.04 (x86_64) and got: [ 1%] Building CXX object src/2geom/CMakeFiles/2geom.dir/matrix.o In file included from /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/matrix.cpp:15:0: /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/utils.h:83:40: error: 'size_t' was not declared in this scope /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/utils.h:83:40: note: suggested alternatives: /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:155:26: note: 'std::size_t' /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:155:26: note: 'std::size_t' /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/utils.h:83:46: error: template argument 1 is invalid /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/utils.h:83:46: error: template argument 2 is invalid /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/utils.h:83:53: error: 'size_t' has not been declared make[2]: *** [src/2geom/CMakeFiles/2geom.dir/matrix.o] Error 1 make[1]: *** [src/2geom/CMakeFiles/2geom.dir/all] Error 2 make: *** [all] Error 2 Despite all the Warning from cmake, I thought perhaps worth sharing... Fixes: - I replaced all appearances of size_t by std::size_t in utils.h (line 85) void binomial_coefficients(std::vector<std::size_t>& bc, std::size_t n); - utils.cpp in function void binomial_coefficients() [ 36%] Built target 2geom [ 37%] Building CXX object src/2geom/toys/CMakeFiles/toy-2.dir/toy-framework-2.o In file included from /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/toys/toy-framework-2.cpp:2:0: /home/cparg/Downloads/lib2geom-0.2.0/src/2geom/toys/toy-framework-2.h:9:21: fatal error: gtk/gtk.h: No such file or directory compilation terminated. make[2]: *** [src/2geom/toys/CMakeFiles/toy-2.dir/toy-framework-2.o] Error 1 make[1]: *** [src/2geom/toys/CMakeFiles/toy-2.dir/all] Error 2 make: *** [all] Error 2 after sudo aptitude install libgtk2.0-dev and another make it built! Thx Christian |