LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2010, 03:39 AM   #1
moravveji
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
Question 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.
 
Old 05-29-2010, 08:38 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Give google a go; you'll love it:

http://www.google.co.uk/search?clien...utf-8&oe=utf-8
 
1 members found this post helpful.
Old 08-14-2010, 07:00 PM   #3
moravveji
LQ Newbie
 
Registered: May 2010
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] graph plotting with scilab5.2.2 in ubuntu okoloko Linux - Newbie 2 05-03-2010 02:27 PM
linking X11 libraries samqazi1 Linux - Software 2 01-04-2006 02:14 AM
problem on linking Xm Xt X11 libraries yaotz Linux - Newbie 9 03-07-2005 12:03 PM
X11 no screen error computerpress Slackware 1 01-16-2005 04:16 AM
x11 and 'screen' beaucoup Linux - Software 2 10-10-2003 02:30 PM


All times are GMT -5. The time now is 01:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration