Code:
#include <iostream>
#include <fstream>
#include <set>
#include <map>
/*
* Generates a clause_set and a dictionary, given an inputstream
* Returns a clause_set
* Returns a dictionary through the parameter: std::map<std::string, long>
*/
std::set < std::set < long >>generate(std::ifstream &, std::map < std::string,
long >*);
/*
* Reprints the given Set provided a dictonary.
*/
void printClauseSet(std::set < std::set < long > >, std::map < std::string,
long >&);
//Reprints the given Clause
void printClause(std::set < long >, std::map < std::string, long >&);
int main(int argc, char *argv[])
{
if (argc != 2) {
std::cout << "You must specify exactly one argument." << std::endl;
return EXIT_FAILURE;
}
std::map < std::string, long >dictonary;
std::ifstream infile(argv[1]);
std::set < std::set < long >>clause_set = generate(infile, &dictonary);
}
std::set < std::set < long >>generate(std::fstream & infile,
std::map < std::string, long >*to_return)
{ //stuffhere}
Compiler Error:
Undefined symbols for architecture x86_64:
"generate(std::__1::basic_ifstream<char, std::__1::char_traits<char> >&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic _string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, long> > >*)", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
Mysterious to me... What has this to do with x86_64