I don't understand why XCode is running into a linking issue when using
string create_base_uri(string host, int port, string dbname){
std::ostringstream ostr; //output string stream
ostr << port; //use the string stream just like cout,
string port_string = ostr.str();
return "http://" + host + ":" + port_string + "/" + dbname;
}
Undefined symbols for architecture x86_64: "CouchServer::create_base_uri(std::__1::basic_string, std::__1::allocator >, int, std::__1::basic_string, std::__1::allocator >)", referenced from: CouchServer::get_document_by_id(std::__1::basic_string, std::__1::allocator >) in couch_server.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can someone help me out?
create_base_uri
defined in the classCouchServer
? It doesn't look like it in the example you've given. – Peter Woodstring CouchServer::create_base_uri(string host, int port, string dbname) { //...
– Peter Wood