使用高版本boost库导致xp下找不到GetTickCount64函数的解决方法
2015-05-13 20:25
357 查看
转载自:http://blog.csdn.net/keljony/article/details/44017775
由于某些原因项目1中用到的boost库从boost_1_39升级到boost_1_55,升级完成后将程序放在xp下测试,提示找不到
branches/release/boost/thread/win32/thread_primitives.hpp
当
所以只要在项目中将
另附上关于_WIN32_WINNT宏的含义
由于某些原因项目1中用到的boost库从boost_1_39升级到boost_1_55,升级完成后将程序放在xp下测试,提示找不到
GetTickCount64()函数,整合工程却没有发现哪调用了此函数,最后在boost官网上早有人提到了这个问题。
branches/release/boost/thread/win32/thread_primitives.hpp
<code class="language-c++ hljs cs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background: transparent;">r81667 r83525 <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">18</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">18</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#include <algorithm> </span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">19</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">19</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">20</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#ifndef BOOST_THREAD_WIN32_HAS_GET_TICK_COUNT_64 </span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">21</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#<span class="hljs-keyword" style="box-sizing: border-box;">if</span> _WIN32_WINNT >= 0x0600 </span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">22</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#<span class="hljs-keyword" style="box-sizing: border-box;">define</span> BOOST_THREAD_WIN32_HAS_GET_TICK_COUNT_64 </span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">23</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#<span class="hljs-keyword" style="box-sizing: border-box;">endif</span> </span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">24</span> <span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#<span class="hljs-keyword" style="box-sizing: border-box;">endif</span></span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul>
当
_WIN32_WINNT >= 0x0600时会定义BOOST_THREAD_WIN32_HAS_GET_TICK_COUNT_64
所以只要在项目中将
_WIN32_WINNT这个宏的值改成比0x0600小就可以了。
另附上关于_WIN32_WINNT宏的含义
相关文章推荐
- 使用高版本boost库导致xp下找不到GetTickCount64函数的解决方法
- 关于使用NotificationComat导致android2.3及以下版本无法显示自定义布局的解决方法.
- ARX二次开发中使用DAO方式访问数据库,导致AutoCAD2004及以上版本退出时报错的解决方法
- ARX二次开发中使用DAO方式访问数据库,导致AutoCAD2004及以上版本退出时报错的解决方法
- 使用U盘PE安装系统,显示安装程序无法重新启动计算机,请关闭所有应用程序并且关机,以便继续进行XP安装。找不到网络路径。的解决方法
- ARX二次开发中使用DAO方式访问数据库,导致AutoCAD2004及以上版本退出时报错的解决方法
- 使用U盘PE安装系统,显示安装程序无法重新启动计算机,请关闭所有应用程序并且关机,以便继续进行XP安装。找不到网络路径。的解决方法
- 在使用阿里的开源数据库同步服务otter时,使用Spring-Cache导致Spring找不到Bean方法时的解决方法
- 使用最新版本的androidjunitrunner运行测试用例报:xxx/R.txt (系统找不到指定的文件。)的解决方法
- eclipse中使用maven创建项目JDK版本默认是1.5解决方法
- 由于dom结构的改变导致事件处理程序找不到事件主体报错的解决方法
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题
- html5新特性:利用history的pushState等方法来解决使用ajax导致页面后退和前进的问题