我要评分
获取效率
正确性
完整性
易理解

Error Reported When Running the make Command for FastDB Compilation and Installation

Symptom

When the make command is executed to compile and install FastDB, the messages "error: call of overloaded 'fmax(float&, float&)' is ambiguous quote.high = fmax(quote.open, quote.close);" and "error: call of overloaded 'fmin(float&, float&)' is ambiguous quote.low = fmin(quote.open, quote.close);" are displayed.

Key Process and Cause Analysis

The fmax and fmin functions in the testtimeseries.cpp file have the same names as those in the cmath file. You need to rename the functions in the testtimeseries.cpp file.

Conclusion and Solution

  1. Open the testtimeseries.cpp file.
    vim examples/testtimeseries.cpp
  2. Press i to enter the insert mode and add the following content to the file:
    :%s/fmax/fmax_t/g
    :%s/fmin/fmin_t/g
    :wq
  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Run the make command again.