Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling the readme example #20

Open
samuelcolvin opened this issue Apr 28, 2017 · 0 comments
Open

compiling the readme example #20

samuelcolvin opened this issue Apr 28, 2017 · 0 comments

Comments

@samuelcolvin
Copy link

Hi, I'm looking to use mstch from python as a more performant mustache template renderer, however my experience with compiling c++ is letting me down.

Could you give an idiot proof explanation of how to compile the first example in README.md?

After installing mstch (cmake; make; sudo make install) I'm getting:

(env) python-mustache ➤  g++ -std=c++11 example.cpp -o example
/tmp/ccPGuipz.o: In function `main':
example.cpp:(.text+0x668): undefined reference to `mstch::render(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::variant<boost::detail::variant::recursive_flag<decltype(nullptr)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, double, bool, mstch::internal::lambda_t<boost::recursive_variant_>, std::shared_ptr<mstch::internal::object_t<boost::recursive_variant_> >, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::recursive_variant_, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::recursive_variant_> > >, std::vector<boost::recursive_variant_, std::allocator<boost::recursive_variant_> > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)'
collect2: error: ld returned 1 exit status

What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant