Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.88k stars 151 forks source link

Compilation fails since 755b86e #626

Closed markozajc closed 8 months ago

markozajc commented 8 months ago

System information

Distribution: Debian 12 GCC version: gcc version 12.2.0 (Debian 12.2.0-14) CFLAGS: -O3 -D_FORTIFY_SOURCE=2 -march=native -fPIC libqalculate version: 82779b9dcf6b56aefe7e70bd680923f1f9e699ac (but fails since 755b86e12358d469e507d1ac52d59ce5d09482fb)

Compiler error

Calculator-convert.cc:419:15: error: no declaration matches 'MathStructure Calculator::convert(const MathStructure&, Unit*, const EvaluationOptions&, bool, bool)'
  419 | MathStructure Calculator::convert(const MathStructure &mstruct, Unit *to_unit, const EvaluationOptions &eo, bool always_convert, bool convert_to_mixed_units) {
      |               ^~~~~~~~~~
Calculator-convert.cc:280:15: note: candidates are: 'MathStructure Calculator::convert(std::string, Unit*, Unit*, const EvaluationOptions&)'
  280 | MathStructure Calculator::convert(string str, Unit *from_unit, Unit *to_unit, const EvaluationOptions &eo) {
      |               ^~~~~~~~~~
Calculator-convert.cc:232:15: note:                 'MathStructure Calculator::convert(std::string, Unit*, Unit*, int, const EvaluationOptions&)'
  232 | MathStructure Calculator::convert(string str, Unit *from_unit, Unit *to_unit, int msecs, const EvaluationOptions &eo) {
      |               ^~~~~~~~~~
Calculator-convert.cc:214:15: note:                 'MathStructure Calculator::convert(double, Unit*, Unit*, const EvaluationOptions&)'
  214 | MathStructure Calculator::convert(double value, Unit *from_unit, Unit *to_unit, const EvaluationOptions &eo) {
      |               ^~~~~~~~~~
Calculator-convert.cc:298:15: note:                 'MathStructure Calculator::convert(const MathStructure&, KnownVariable*, const EvaluationOptions&)'
  298 | MathStructure Calculator::convert(const MathStructure &mstruct, KnownVariable *to_var, const EvaluationOptions &eo) {
      |               ^~~~~~~~~~
In file included from Calculator-convert.cc:14:
Calculator.h:763:23: note:                 'MathStructure Calculator::convert(const MathStructure&, Unit*, const EvaluationOptions&, bool, bool, bool, MathStructure*)'
  763 |         MathStructure convert(const MathStructure &mstruct, Unit *to_unit, const EvaluationOptions &eo = default_user_evaluation_options, bool always_convert = true, bool convert_to_mixed_units = true, bool transform_orig = false, MathStructure *parsed_struct = NULL);
      |                       ^~~~~~~
Calculator.h:753:23: note:                 'MathStructure Calculator::convert(const MathStructure&, std::string, const EvaluationOptions&, MathStructure*)'
  753 |         MathStructure convert(const MathStructure &mstruct, std::string composite_, const EvaluationOptions &eo = default_user_evaluation_options, MathStructure *units = NULL);
      |                       ^~~~~~~
Calculator.h:752:23: note:                 'MathStructure Calculator::convert(const MathStructure&, std::string, const EvaluationOptions&, MathStructure*, bool, MathStructure*)'
  752 |         MathStructure convert(const MathStructure &mstruct, std::string composite_, const EvaluationOptions &eo, MathStructure *units, bool transform_orig, MathStructure *parsed_struct = NULL);
      |                       ^~~~~~~
Calculator.h:267:7: note: 'class Calculator' defined here
  267 | class Calculator {
      |       ^~~~~~~~~~
make: *** [Makefile:685: Calculator-convert.lo] Error 1
hanna-kn commented 8 months ago

Should be fixed now (https://github.com/Qalculate/libqalculate/commit/aed6f6a5533ed846d7bbac1b03eae0645fe2d4e9).