rapidxml icon indicating copy to clipboard operation
rapidxml copied to clipboard

Document how to build

Open grahamking opened this issue 11 years ago • 2 comments

Could you add a quick README with build instructions?

I tried copying rapidxml.hpp into test/ and running:

gcc -std=c++11 simple.cpp

but I get many errors like this:

/tmp/ccDIYmHD.o: In function `main':
simple.cpp:(.text+0xd2): undefined reference to `std::allocator<char>::allocator()'
simple.cpp:(.text+0xed): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'

This is with gcc 4.7.3 on Ubuntu. Does it require a 4.8 gcc?

Thanks!

grahamking avatar Oct 23 '13 15:10 grahamking

I'm rubbish and missed this one entirely.

Probably because it's via github. :-)

You want g++ --std=c++11 - it's possible that you could also do gcc ... -lstdc++

On Wed, Oct 23, 2013 at 4:47 PM, Graham King [email protected]:

Could you add a quick README with build instructions?

I tried copying rapidxml.hpp into test/ and running:

gcc -std=c++11 simple.cpp

but I get many errors like this:

/tmp/ccDIYmHD.o: In function main': simple.cpp:(.text+0xd2): undefined reference tostd::allocator::allocator()' simple.cpp:(.text+0xed): undefined reference to `std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)'

This is with gcc 4.7.3 on Ubuntu. Does it require a 4.8 gcc?

Thanks!

— Reply to this email directly or view it on GitHubhttps://github.com/dwd/rapidxml/issues/1 .

dwd avatar Dec 05 '13 10:12 dwd

That worked, thanks! g++ --std=c++11 test/simple.cpp

grahamking avatar Dec 12 '13 00:12 grahamking