Ubuntu Linux 15.10 64 bit.
Michael Ritter
rob.n.val at hotmail.com
Tue Feb 14 03:09:14 UTC 2017
To all,
Does anyone know how to compile C++ code and link in the X11 library?
I'm using :
g++ -Wall -L/usr/X11/lib -lX11 -m64 --std=c++11 -o prog1 xlib1.cpp
and I get
/tmp/ccVNWGzR.o: In function `main':
xlib1.cpp:(.text+0xe): undefined reference to `XOpenDisplay'
xlib1.cpp:(.text+0x6d): undefined reference to `XCreateWindow'
xlib1.cpp:(.text+0x88): undefined reference to `XMapWindow'
xlib1.cpp:(.text+0x94): undefined reference to `XFlush'
collect2: error: ld returned 1 exit status
in my very small C++ program.
Thanks.
Mike Ritter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-au/attachments/20170214/49cec6a1/attachment.html>
More information about the ubuntu-au
mailing list