0

I had try to build Boost Asio 1.58 for Windows Phone 8.1 & Windows 8.1 with that command b2

b2 toolset=msvc=12.0 windows-api=store architecture=arm

but it's fail on build "libboost_regex-vc120-mt-1_58.lib", so i must need "libboost_regex-vc120-mt-1_58.lib" .

The log say error!

libs\regex\build..\src\fileiter.cpp(102) : error C3861: 'CreateFileA': identifier not found libs\regex\build..\src\fileiter.cpp(106) : error C3861: 'CreateFileMapping': identifier not found libs\regex\build..\src\fileiter.cpp(115) : error C3861: 'MapViewOfFile': identifier not found libs\regex\build..\src\fileiter.cpp(124) : error C3861: 'GetFileSize': identifier not found libs\regex\build..\src\fileiter.cpp(141) : error C3861: 'UnmapViewOfFile': identifier not found libs\regex\build..\src\fileiter.cpp(383) : error C3861: 'FindFirstFileA': identifier not found

So anyone can help me fix it ? Thanks :)

  • You could use the header-only version if you do not need regex, see http://stackoverflow.com/questions/5089245/boost-asio-as-header-only – m.s. May 30 '15 at 10:52
  • I need use regex for tcp connection in my game. So have any solution here. – Đặng Vũ Hải Long May 30 '15 at 10:53
  • what is the relationship between tcp and regex? – m.s. May 30 '15 at 10:54
  • In Win_32 project , if i try to remove regex the project not working, and if had regex it working good. But i can't build library of regex for WP 8.1 or Win 8.1 . – Đặng Vũ Hải Long May 30 '15 at 10:55
  • So, use Boost.Spirit instead of regex. You'll only benefit from it. – Igor R. May 30 '15 at 17:50
  • I don't use Boost.Regex for processing string or anything else. I only use Network to make a TCP client inside Boost Asio . – Đặng Vũ Hải Long May 30 '15 at 18:07
  • Boost.Asio depends on regex only if you use `read_until` or [`async_read_until` overloads that use `boost::regex` parameter](http://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/using.html). Just do not use these functions! – Igor R. May 30 '15 at 21:56
  • Ya. I don't use read_until or async_read_until , but i don't know how to remove regex, when i compile it's always show error "libboost_regex-vc120-mt-1_58.lib can't open" :( – Đặng Vũ Hải Long May 31 '15 at 02:41

1 Answers1

0

Go to C++ -> Preprocessor -> Add "BOOST_REGEX_NO_LIB" for disable auto linking Boost.Regex