如何让Xlib代码工作在eclipse中为C ++ ubuntu [英] How to get Xlib code work in eclipse for C++ ubuntu

查看:127
本文介绍了如何让Xlib代码工作在eclipse中为C ++ ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  #include< X11 / Xlib.h> 
#include< X11 / Xutil.h>
#include< X11 / Xos.h>
#include< X11 / Xatom.h>

对不起,这个新的..
好​​的,所以现在我可以查看标题在foldrrs在我的eclipse IDE中
,我得到以下错误。源码没有问题,因为朋友从终端运行它,我想从eclipse ide执行:



在函数 main'中:
/home/abbas/workspace/test3/Debug/../src/test3.cpp:51:未定义引用
XOpenDisplay '



和许多其他相同类型的错误,但功能不同。



collect2:ld returned 1退出状态
make:*** [test3]错误1



Plzz hellpp !!

解决方案

右键单击项目文件夹>属性> C / C ++构建>设置> GCC C ++链接器>库>添加X11


I have some code with the following headers for Xlib but don't know what to do to make it work...I can't find these headers.

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>

Sorry new to this.. Okay so now I can view the headers in the foldrrs in my eclipse IDE. and i get the following errors.Thee is no problem with the source as friends have run it from the terminal,and i want to do it from eclipse ide:

In function main': /home/abbas/workspace/test3/Debug/../src/test3.cpp:51: undefined reference toXOpenDisplay'

and many other errors of the same type but the functions are different.

collect2: ld returned 1 exit status make: *** [test3] Error 1

Plzz hellpp!!

解决方案

Right click on Project Folder> Properties> C/C++ Build > Settings > GCC C++ Linker > Libraries > add "X11"

这篇关于如何让Xlib代码工作在eclipse中为C ++ ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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