LibreCAD / LibreCAD_3

LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
http://librecad.org
Other
305 stars 102 forks source link

‘class tinyspline::BSpline’ has no member named ‘data’ #380

Closed CaesarSilva closed 2 years ago

CaesarSilva commented 2 years ago

I get this error while trying to build LibreCad.

/pathtolibrecad/LibreCAD_3/lckernel/cad/geometry/geospline.cpp: In member function ‘void lc::geo::Spline::populateCurve()’:
/pathtolibrecad//LibreCAD_3/lckernel/cad/geometry/geospline.cpp:103:59: error: ‘class tinyspline::BSpline’ has no member named ‘data’
  103 |     int nbBeziers = ts_bspline_num_control_points(beziers.data()) / splineCurve.order();
      |                                 

Also, I had an error prior to that with the command git submodule update --recursive --remote

Submodule path 'lckernel/tinyspline': checked out '2cd630a171e9ab2bd649994954b46eb47e2248a6'
fatal: Needed a single revision
Unable to find current origin/master revision in submodule path 'third_party/kaguya'

I'm on Xubuntu 20.04.

CaesarSilva commented 2 years ago

I took a look at the old tinysplinecpp.cpp and tinysplinecpp.h files and i edited the files tinysplinecxx.cpp and tinysplinecxx.h. I added this to the header. tsBSpline* data(); And this to the cpp file.

tsBSpline* tinyspline::BSpline::data()
{
    return &spline;
}

I copied it from the old files and I edited the class name to match it with the current version.

That's not a permanent solution but it works.

alexander982 commented 2 years ago

You also can run git submodule update --checkout. But it is not good solution too - iss177.