未定义对符号'_ZN5boost6system15system_categoryEv'的引用错误 [英] undefined reference to symbol '_ZN5boost6system15system_categoryEv' error

查看:124
本文介绍了未定义对符号'_ZN5boost6system15system_categoryEv'的引用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不熟悉c ++ rest sdk Casablanca ,并在 Codelite ide 中使用它.
操作系统: Arch Linux
gcc版本: 6.1.1
构建代码时,在调试模式下出现以下错误:

I'm new to c++ rest sdk Casablanca and using it in Codelite ide.
Operating System : Arch Linux
gcc version : 6.1.1
While building the code I get the following error in debug mode:

/bin/sh -c '/usr/bin/make -j4 -e -f  Makefile'
----------Building project:[ Casa - Debug ]----------
make[1]: Entering directory '/home/vinci/Documents/CPP_Projects_Programs/Casa'
/usr/bin/g++  -c  "/home/vinci/Documents/CPP_Projects_Programs/Casa/main.cpp" -g -O0 -fopenmp -std=c++14 -std=c++11 -Wall  -o ./Debug/main.cpp.o -I. -I/usr/local/include/cpprest -I/usr/local/include/pplx -I/home/vinci/casablanca/Release/src -I. -I/usr/local/include/cpprest -I/usr/local/include/pplx
/usr/bin/g++ -o ./Debug/Casa @"Casa.txt" -L. -L/usr/local/lib -L/usr/lib64 -L/usr/lib  -lcpprest
/usr/bin/ld: ./Debug/main.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/libboost_system.so.1.60.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Casa.mk:79: Debug/Casa] Error 1
make[1]: Leaving directory '/home/vinci/Documents/CPP_Projects_Programs/Casa'
make: *** [Makefile:5: All] Error 2
====1 errors, 0 warnings, total time: 00:00:14 seconds====

我在提出问题之前在 Stackoverflow 上进行了搜索,大多数答案都指向在项目设置中正确链接库,我已经做到了,正如上面的代码所示,但仍然不断给出错误,我不知道我在想什么?

I searched this on Stackoverflow before asking and most of the answers just pointed to linking the libraries properly in project settings and I have done that as one can see in the code above but still keeps giving the error and I don't know what am i missing??

一点帮助将不胜感激...谢谢

A little Help would be appreciated... Thank You

推荐答案

/usr/lib/libboost_system.so.1.60.0: error adding symbols: DSO missing from command line

此 DSO 错误意味着命令行中缺少 libboost_system.您还应该添加:

This DSO error means that libboost_system is missing from the command line. You should also add:

-lboost_system

就像-lcpprest一样进入命令行

to your command line just like -lcpprest

这篇关于未定义对符号'_ZN5boost6system15system_categoryEv'的引用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆