LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu 9.10 X11 linking and on-screen plotting (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-9-10-x11-linking-and-on-screen-plotting-810388/)

moravveji 05-27-2010 02:39 AM

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.

jamescondron 05-29-2010 07:38 AM

Give google a go; you'll love it:

http://www.google.co.uk/search?clien...utf-8&oe=utf-8

moravveji 08-14-2010 06:00 PM

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.