Code Monkey home page Code Monkey logo

Comments (1)

xphoniex avatar xphoniex commented on August 17, 2024 6

Problem

~/OMPEval-master$ make

g++ -O3 -std=c++11 -Wall -Wpedantic -pthread   -c -o omp/EquityCalculator.o omp/EquityCalculator.cpp
In file included from omp/EquityCalculator.cpp:1:
omp/EquityCalculator.h:76:21: error: ‘std::function’ has not been declared
                std::function<void(const Results&)> callback = nullptr,
                     ^~~~~~~~
omp/EquityCalculator.h:76:29: error: expected ‘,’ or ‘...’ before ‘<’ token
                std::function<void(const Results&)> callback = nullptr,
                             ^
omp/EquityCalculator.h:202:10: error: ‘function’ in namespace ‘std’ does not name a template type
     std::function<void(const Results& results)> mCallback;
          ^~~~~~~~
omp/EquityCalculator.h:202:5: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
omp/EquityCalculator.h:15:1:
+#include <functional>
 #include <array>
omp/EquityCalculator.h:202:5:
     std::function<void(const Results& results)> mCallback;
     ^~~
omp/EquityCalculator.h:74:10: error: default argument missing for parameter 6 of ‘bool omp::EquityCalculator::start(const std::vector<omp::CardRange>&, uint64_t, uint64_t, bool, double, int)’
     bool start(const std::vector<CardRange>& handRanges, uint64_t boardCards = 0, uint64_t deadCards = 0,
          ^~~~~
omp/EquityCalculator.cpp:14:74: error: ‘std::function’ has not been declared
                         bool enumerateAll, double stdevTarget, std::function<void(const Results&)> callback,
                                                                     ^~~~~~~~

omp/EquityCalculator.cpp:14:82: error: expected ‘,’ or ‘...’ before ‘<’ token
                 bool enumerateAll, double stdevTarget, std::function<void(const Results&)> callback,
                                                                     ^

omp/EquityCalculator.cpp: In member function ‘bool omp::EquityCalculator::start(const std::vector<omp::CardRange>&, uint64_t, uint64_t, bool, double, int)’:
omp/EquityCalculator.cpp:47:5: error: ‘mCallback’ was not declared in this scope
     mCallback = callback;
     ^~~~~~~~~
omp/EquityCalculator.cpp:47:5: note: suggested alternative: ‘malloc’
     mCallback = callback;
     ^~~~~~~~~
     malloc
omp/EquityCalculator.cpp:47:17: error: ‘callback’ was not declared in this scope
     mCallback = callback;
                 ^~~~~~~~
omp/EquityCalculator.cpp:47:17: note: suggested alternative: ‘calloc’
     mCallback = callback;
                 ^~~~~~~~
                 calloc
omp/EquityCalculator.cpp:48:23: error: ‘updateInterval’ was not declared in this scope
     mUpdateInterval = updateInterval;
                       ^~~~~~~~~~~~~~
omp/EquityCalculator.cpp:48:23: note: suggested alternative: ‘mUpdateInterval’
     mUpdateInterval = updateInterval;
                       ^~~~~~~~~~~~~~
                       mUpdateInterval
omp/EquityCalculator.cpp:51:9: error: ‘threadCount’ was not declared in this scope
     if (threadCount == 0)
         ^~~~~~~~~~~
omp/EquityCalculator.cpp:51:9: note: suggested alternative: ‘pthread_once’
     if (threadCount == 0)
         ^~~~~~~~~~~
         pthread_once
omp/EquityCalculator.cpp:53:26: error: ‘threadCount’ was not declared in this scope
     mUnfinishedThreads = threadCount;
                          ^~~~~~~~~~~
omp/EquityCalculator.cpp:53:26: note: suggested alternative: ‘pthread_once’
     mUnfinishedThreads = threadCount;
                          ^~~~~~~~~~~
                          pthread_once
omp/EquityCalculator.cpp: In member function ‘void omp::EquityCalculator::updateResults(const omp::EquityCalculator::BatchResults&, bool)’:
omp/EquityCalculator.cpp:740:13: error: ‘mCallback’ was not declared in this scope
         if (mCallback)
             ^~~~~~~~~
omp/EquityCalculator.cpp:740:13: note: suggested alternative: ‘malloc’
         if (mCallback)
             ^~~~~~~~~
             malloc
<builtin>: recipe for target 'omp/EquityCalculator.o' failed
make: *** [omp/EquityCalculator.o] Error 1

Solution
Do as the compiler suggests:

did you forget to ‘#include <functional>’?
omp/EquityCalculator.h:15:1:
+#include <functional>
 #include <array>

from ompeval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.