main.cpp:: undefined reference to `Graph_lib::Shape::Shape(std::initializer_list<Graph_lib::Point>)'
This same error happens with various versions of the same basic main.cpp lines:
Open_polyline open_poly1 = { {10,20}, { 40, 333} };
win.attach(open_poly1);
And also:
vector<Point> my_points {Point{100, 100}, Point{150, 200}};
Open_polyline open_poly1 = {my_points[0], my_points[1]};
Interestingly, the following works fine:
vector<Point> my_points {Point{100, 100}, Point{150, 200}};
Open_polyline open_poly1;
open_poly1.add(my_points[0]);
open_poly1.add(my_points[1]);
9:49:16: Running steps for project polys...
09:49:16: Starting: "/usr/bin/cmake" --build . --target all
Scanning dependencies of target polys
[ 16%] Building CXX object CMakeFiles/polys.dir/main.cpp.o
[ 33%] Linking CXX executable polys
CMakeFiles/polys.dir/main.cpp.o: In function `Graph_lib::Open_polyline::Open_polyline(std::initializer_list<Graph_lib::Point>)':
main.cpp:(.text._ZN9Graph_lib13Open_polylineC2ESt16initializer_listINS_5PointEE[_ZN9Graph_lib13Open_polylineC5ESt16initializer_listINS_5PointEE]+0x30): undefined reference to `Graph_lib::Shape::Shape(std::initializer_list<Graph_lib::Point>)'
CMakeFiles/polys.dir/build.make:214: recipe for target 'polys' failed
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/polys.dir/all' failed
Makefile:83: recipe for target 'all' failed
collect2: error: ld returned 1 exit status
make[2]: *** [polys] Error 1
make[1]: *** [CMakeFiles/polys.dir/all] Error 2
make: *** [all] Error 2
09:49:17: The process "/usr/bin/cmake" exited with code 2.
Error while building/deploying project polys (kit: Desktop)
When executing step "CMake Build"
Yes. It works with chapter 12 to 16. If you find a bug, please let me know.I tried to keep the library as close to the 2nd edition book as possible, and the possible bugs in the book I put in the bugs.html.
I was at beginning working with this version:
https://groups.google.com/d/msg/ppp-public/BtlzdWGuQpQ/KuDN4u-SPKgJ
But I had problems at some time.
So, I decided to modify the PPP1 library so that it could be close to 2nd Edition book using the book itself and parts of the Problematic prior library. This is how the ch12new was born.
I don't mind if you modify it, but the users might like to know the modifications. You might write a section like "Difference between it and the ch12new" in your repository.
I was at beginning working with this version:
https://groups.google.com/d/msg/ppp-public/BtlzdWGuQpQ/KuDN4u-SPKgJ
But I had problems at some time.
So, I decided to modify the PPP1 library so that it could be close to 2nd Edition book using the book itself and parts of the Problematic prior library. This is how the ch12new was born.
I don't mind if you modify it, but the users might like to know the modifications. You might write a section like "Difference between it and the ch12new" in your repository.
return static_cast<bool>(ff);
ifstream ff(s);
return ff.is_open();
I don't mind if you modify it, but the users might like to know the modifications. You might write a section like "Difference between it and the ch12new" in your repository.
On Jun 20, 2018, at 11:05 AM, Christiano SA <chris...@engineer.com> wrote:I've attached a new version without warnings and a screenshot with final chapter 12 example. It was tested with Clang++ and G++.
I've attached a new version without warnings and a screenshot with final chapter 12 example. It was tested with Clang++ and G++.
typedef std::function<double (double)> Fct;