简体   繁体   English

尝试在Mingw中使用boost时出错

[英]error when trying to use boost with mingw

when I'm trying to use boost with minGW i get this error: 当我尝试对minGW使用boost时,出现以下错误:

C:/Users/matan_000/Documents/Programming/c++-libraries/MinGW/include/boost/system/error_code.hpp:676: undefined reference to `boost::system::generic_category()'

and more like this... 像这样...

I have included: 我包括:

C:\\Users\\matan_000\\Documents\\Programming\\c++-libraries\\MinGW\\include C:\\ Users \\ matan_000 \\ Documents \\ Programming \\ c ++-libraries \\ MinGW \\ include

for the compiler include path in codelite idle and included 对于编译器,包含Codelite空闲和包含的路径

C:\\Users\\matan_000\\Documents\\Programming\\c++-libraries\\MinGW\\lib C:\\ Users \\ matan_000 \\ Documents \\ Programming \\ c ++-libraries \\ MinGW \\ lib

for the linker include path in codelite idle. 链接器的包含在Codelite空闲路径中。

Im using 我正在使用

http://nuwen.net/mingw.html http://nuwen.net/mingw.html

because i had the same error with the official boost, so i thought that way it will work. 因为我在官方提升中有相同的错误,所以我认为这样可以正常工作。

but it doesnt work... 但它不起作用...

PLEASE i need help! 请我需要帮助! im going to give up completely :( 我要彻底放弃:(

UPDATE 更新

I just fixed it with add "-lboost_system" as compile argument. 我只是通过添加“ -lboost_system”作为编译参数来修复它。

And i got new weird error. 而且我得到了新的怪异错误。 I fixed it too with add the "-ws2_32" as compile argument too. 我也通过添加“ -ws2_32”作为编译参数来修复它。 But i dont what that argument says... And do... If someone can explain me i will thank him :) 但是我不知道那个论点是什么...而且做...如果有人可以解释我,我将感谢他:)

To link to the 'boost_system' library you need to provide the path to the boost library with -L flag and the name of the boost system library, eg 'boost_system-mgw53-mt-d-x32-1_67' with the '-l' flag. 要链接到'boost_system'库,您需要使用-L标志和boost系统库的名称提供Boost库的路径,例如'boost_system-mgw53-mt-d-x32-1_67'和'-l的标志。

If you haven't imported or built the boost libraries for MinGw yet, there are some instructions here: boost_1_60_0 .zip installation in windows . 如果您尚未导入或构建MinGwboost库, MinGw点击此处了解一些说明: boost_1_60_0 .zip在Windows中的安装 However, please note that you now need to type bootstrap.bat gcc instead of bootstrap.bat mingw ... 但是,请注意,您现在需要键入bootstrap.bat gcc而不是bootstrap.bat mingw ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM