Problem was solved by adding .dylib files (boost) to project.
I'm trying connect Boost 1.55 to Xcode 5 through Homebrew. Brew installed it as it should. In /usr/local/include && /usr/local/lib appeared aliases on Boost headers and libraries.
Xcode "Search Path" settings: http://i.imgur.com/j5GJ0sh.png http://i.imgur.com/DXRxiyA.png
But when I tried compile simple example:
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;
int main()
{
const regex expression( "How to re" );
string string1 = "How to re";
bool match=regex_match(string1,expression);
if (match){
cout<<"Yes"<<endl;
}
return 0;
}
Errors:
Undefined symbols for architecture x86_64: "boost::basic_regex >
::do_assign(char const*, char const*, unsigned int)", referenced from: boost::basic_regex > >::assign(char const*, char const*, unsigned int) in main.o "boost::re_detail::get_mem_block()", referenced from: boost::re_detail::perl_matcher, std::__1::allocator > >, boost::regex_traits > ::extend_stack() in main.o boost::re_detail::save_state_init::save_state_init(boost::re_detail::saved_state**, boost::re_detail::saved_state**) in main.o
"boost::re_detail::put_mem_block(void*)", referenced from: boost::re_detail::save_state_init::~save_state_init() in main.o boost::re_detail::perl_matcher, std::__1::allocator > >, boost::regex_traits > ::unwind_extra_block(bool) in main.o "boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)", referenced from: boost::re_detail::perl_matcher, std::__1::allocator > >, boost::regex_traits > ::match_imp() in main.o "boost::re_detail::raise_runtime_error(std::runtime_error const&)", referenced from: void boost::re_detail::raise_error > > (boost::regex_traits_wrapper > > const&, boost::regex_constants::error_type) in main.o
"boost::re_detail::get_default_error_string(boost::regex_constants::error_type)", referenced from: boost::re_detail::cpp_regex_traits_implementation::error_string(boost::regex_constants::error_type) const in main.o
"boost::re_detail::cpp_regex_traits_implementation::transform_primary(char const*, char const*) const", referenced from: boost::cpp_regex_traits::transform_primary(char const*, char const*) const in main.o
"boost::re_detail::cpp_regex_traits_implementation::transform(char const*, char const*) const", referenced from: boost::cpp_regex_traits::transform(char const*, char const*) const in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Really tired with it, so, ask for your help.
Thank you, - Philipp
-l
or manually in Xcode? – sbooth