c++11 – C++ error: Undefined symbols for architecture x86_64

c++11 – C++ error: Undefined symbols for architecture x86_64

Your compiler error is coming from the fact that your signature for the forward declaration of _num_steps does not match the signature of your definition of _num_steps. the type of steps_list does not match

Change your prototype line to:

void _num_steps(int amount, vector<int> possible_steps, vector<int> steps_list, vector<vector<int>> result);

The types in argument list of a function declaration and its definition must be the same.

Yours dont match.

Declaration:

void _num_steps(int amount, vector<int> possible_steps, vector<vector<int>> steps_list, vector<vector<int>> result);

Definition:

void _num_steps(int amount, vector<int> possible_steps, vector<int> steps_list,  vector<vector<int>> result) { /* ... */ }

c++11 – C++ error: Undefined symbols for architecture x86_64

Leave a Reply

Your email address will not be published.