Hi all,
In my the operating system ubuntu14.04, a classical GTK+ program can be run by double click. When the PLplot was used in the program, it could not be run by double click and should run in a terminal. The follow example was given by PLplot. https://sourceforge.net/p/plplot/plplot/ci/master/tree/examples/c/extXdrawable_demo.c
If we cut out the follow Plplot code segment in extXdrawable_demo.c
/*plsdev("xcairo");plsetopt("drvopt","external_drawable");plinit();#ifTO_PIXMAP==1// Here we set up to draw to a pixmapxinfo.display=GDK_PIXMAP_XDISPLAY(a->plotwindow_pixmap);xinfo.drawable=GDK_PIXMAP_XID(a->plotwindow_pixmap);#else// Alternatively, we can do direct to a visible X Windowxinfo.display=GDK_WINDOW_XDISPLAY(a->plotwindow->window);xinfo.drawable=GDK_WINDOW_XID(a->plotwindow->window);#endifpl_cmd(PLESC_DEVINIT,&xinfo);plenv(0,5,0,5,0,0);plline(3,x,y);plend();*/
The executable file extXdrawable_demo would still be generated. But It cannot be run by double click.
You must run it in a terminal by
./extXdrawable_demo
I don't konw what on earth do PLplot do for the program? Can some one answer my question and give a method to make the extXdrawable_demo run by double click as a classical GTK+ program.
Best regards,
LI Chang-Sheng
School of Earth Sciences and Engineering
Nanjing University
163 XIANLIN Road, Nanjing
Jiangsu Province 210023
P.R. of China
E-mail: sheng0619@163.com;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I find the reason.
In the past , I always set the LD_LIBRARY_PATH in ~/.bashrc.
export LD_LIBRARY_PATH=~/desktop/support_lib/plplot-5.11.0-install/lib
This file just runs together with a new terminal. So If I don't run the terminal, the program would not find the PLplot lib.
Now I set LD_LIBRARY_PATH in /etc/environment. I need not open a terminal for the program, and example1 can be opened from the file browser by double-click.
Best regards,
LI Chang-Sheng
School of Earth Sciences and Engineering
Nanjing University
163 XIANLIN Road, Nanjing
Jiangsu Province 210023
P.R. of China
E-mail: sheng0619@163.com;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
In my the operating system ubuntu14.04, a classical GTK+ program can be run by double click. When the PLplot was used in the program, it could not be run by double click and should run in a terminal. The follow example was given by PLplot. https://sourceforge.net/p/plplot/plplot/ci/master/tree/examples/c/extXdrawable_demo.c
If we cut out the follow Plplot code segment in extXdrawable_demo.c
and compiled the code by
A executable file named extXdrawable_demo would be generated. It can be run by double click and a window would show.
If I didn't cut out the above-mentioned Plplot code segment and compiled the code by
The executable file extXdrawable_demo would still be generated. But It cannot be run by double click.
You must run it in a terminal by
I don't konw what on earth do PLplot do for the program? Can some one answer my question and give a method to make the extXdrawable_demo run by double click as a classical GTK+ program.
Best regards,
LI Chang-Sheng
School of Earth Sciences and Engineering
Nanjing University
163 XIANLIN Road, Nanjing
Jiangsu Province 210023
P.R. of China
E-mail: sheng0619@163.com;
Hi all,
I find the reason.
In the past , I always set the LD_LIBRARY_PATH in ~/.bashrc.
export LD_LIBRARY_PATH=~/desktop/support_lib/plplot-5.11.0-install/lib
This file just runs together with a new terminal. So If I don't run the terminal, the program would not find the PLplot lib.
Now I set LD_LIBRARY_PATH in /etc/environment. I need not open a terminal for the program, and example1 can be opened from the file browser by double-click.
Best regards,
LI Chang-Sheng
School of Earth Sciences and Engineering
Nanjing University
163 XIANLIN Road, Nanjing
Jiangsu Province 210023
P.R. of China
E-mail: sheng0619@163.com;