Ubuntu 9.10 X11 linking and on-screen plotting
Hi all,
I use Ubuntu 9.10, and have a problem linking PGPLOT to X11 to view the output of some plottings on-screen. I already had libx11-dev and PGPLOT installed, and found the path to libx11.so and libpgplot.so at /usr/lib. I successfully link to this library as f77 -o simple_ehsan simple.f -L /usr/lib -lpgplot -L /usr/lib -lX11 But, when running the code called simple_ehsan which calls pgplot, I receive the following error message: ehsan@ehsan:~/programs/pgmoog/testprog$ ./simple_ehsan Graphics device/type (? to see list, default /xwin): /xwin PGPLOT /xw: cannot connect to X server [0] I also receive the same complaint when trying to run /usr/bin/xclock: root@ehsan:/usr/bin# ./xclock Error: Can't open display: 0 I cannot figure out with the on-screen display problem I have. I also have to mention that I'm an Ubuntu newbie. Best wishes. |
|
Hi all. The last replies were perfect. I really thank you.
I use Ubuntu 10.04. This time, I need to link Xext library to another program to generate on-screen outputs. the link is supposed to be: -L/usr/lib/pgplot5 -lpgplot -L/usr/lib -lX11 -lxcb -lXau -lXdmcp -lpng -lz -lXext But the last term -lXext gives an error: /usr/bin/ld: cannot find -lXext I tried to install x11proto-xext-dev from synaptic but nothing improved. Note that locate Xext gives /usr/lib/libXext.so.6 /usr/lib/libXext.so.6.4.0 So my linking path must be correct. Do you have any idea? |
All times are GMT -5. The time now is 04:26 AM. |