472,353 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Dislin compilation

Hi everybody

I want to recompile the DISLIN graphics module for Python under Linux, because
I think it is one of the best graphics libraries at present.
The included module was for version 2.0 and I want it for 2.2 or maybe 2.3.
The problem is, that I use the small make_py script which only
calls the gcc compiler

CC="gcc -fPIC -c -O"
PYTH_INC="/usr/local/include/python2.0"
PYTH_CONF="/usr/local/lib/python2.0/config"
gcc -shared -Wl,-soname,dislinmodule.so -o dislinmodule.so *.o \
-L$DISLIN -ldislnc
but I think many variables arent configured,
so a long list of errors follows (I copied the first few lines to
the end)

I dont have experience with makefiles and so I want to ask what I
have to do in a short way.

Thanks in advance

Erwin

My system:
SuSE Linux 8.1 on an AMD-machine
Here are the first few lines of the gcc output

dislinmodule.c:1:20: Python.h: No such file or directory
dislinmodule.c:21: parse error before '*' token
dislinmodule.c:21: parse error before '*' token
dislinmodule.c:21: warning: data definition has no type or storage class
dislinmodule.c:22: parse error before '*' token
dislinmodule.c:22: parse error before '*' token
dislinmodule.c:22: warning: data definition has no type or storage class
dislinmodule.c:23: parse error before '*' token
dislinmodule.c:23: parse error before '*' token
dislinmodule.c:23: warning: data definition has no type or storage class
dislinmodule.c:31: parse error before '*' token
dislinmodule.c:31: warning: data definition has no type or storage class
dislinmodule.c:32: parse error before '*' token
dislinmodule.c:32: warning: data definition has no type or storage class
dislinmodule.c:34: parse error before '*' token
dislinmodule.c: In function `getlength':
dislinmodule.c:37: `o' undeclared (first use in this function)
dislinmodule.c:37: (Each undeclared identifier is reported only once
dislinmodule.c:37: for each function it appears in.)
dislinmodule.c:38: `PyExc_ValueError' undeclared (first use in this function)
dislinmodule.c: At top level:
dislinmodule.c:51: parse error before '*' token
dislinmodule.c: In function `fltarray':
dislinmodule.c:53: `PyObject' undeclared (first use in this function)

Jul 18 '05 #1
2 1842
Gaubitzer Erwin wrote:
Hi everybody

I want to recompile the DISLIN graphics module for Python under Linux, because
I think it is one of the best graphics libraries at present.
The included module was for version 2.0 and I want it for 2.2 or maybe 2.3.
The problem is, that I use the small make_py script which only
calls the gcc compiler

CC="gcc -fPIC -c -O"
PYTH_INC="/usr/local/include/python2.0"
PYTH_CONF="/usr/local/lib/python2.0/config"
gcc -shared -Wl,-soname,dislinmodule.so -o dislinmodule.so *.o \
-L$DISLIN -ldislnc

but I think many variables arent configured,
so a long list of errors follows (I copied the first few lines to
the end)

I dont have experience with makefiles and so I want to ask what I
have to do in a short way.


You have to edit the file 'make_py' and define the variables PYTH_INC and
PYTH_CONF with
corresponding directories of your Python version (i.e.
PYTH_INC=/"usr/local/include/python2.3"
or PYTH_INC="/usr/include/python2.3").
The environment variable DISLIN is used to locate the DISLIN library. You can
define it outside
of the make_py script with the installation directory of DISLIN (i.e. export
DISLIN=/usr/local/dislin).

Regards,

-------------------
Helmut Michels
Max-Planck-Institut fuer Aeronomie Phone: +49 5556 979-334
Max-Planck-Str. 2 Fax : +49 5556 979-240
D-37191 Katlenburg-Lindau Mail : mi*****@linmpi.mpg.de
DISLIN Home Page: http://www.dislin.de
Jul 18 '05 #2
Thanks to all, who have answered
(per mail or in thread)

For all others, who also don't know how to do I summarize shortly

1. The make_py script looks for the Include and the Config directories.
These are in the Python developers version (python-devel rpm
for SuSE:
PYTH_INC="/usr/include/python2.2/" for python version 2.2
PYTH_CONF="/usr/lib/python2.2/config"
in the appropriate section (lnx for Linux)
2. The DISLIN variable has to be defined, for instance in the shell by
export DISLIN=/usr/local/dislin (default directory)
3. Calling
make_py lnx
for Linux OS
4. Copying the module to the right directory
cp dislinmodule.so /usr/local/dislin/python

Now it should work

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Karin Lagesen | last post by:
I have a lot of data that I am going to plot and put on a web server. Since there is a lot of it, I was planning to script it all using python. I...
2
by: Tom Richardson | last post by:
If anyone has any experience using the graphics package DISLIN with Python, I'd appreciate some help. I am trying to use the function tifmod to...
5
by: eesun | last post by:
Hi, I've downloaded the dislin package for the scientific plotting. And I have already created the application window with Tkinter (menu,...
6
by: Richard | last post by:
I am going to need to plot some data and formula results from Python. A few years ago I used gnuplot (not from Python) and was wondering which...
1
by: pwhbeck | last post by:
Linux SUSE 10.1 Python 2.5 Dislin 9.1 Download dislin 9.1, change to directory dislin-9.1/python Change make_py to: elif test $1 = lnx ;...
3
by: luis | last post by:
Hello! I have an unespectedn result with dislin titlin dislin.metafl ('WMF') dislin.disini () ..... a="Andrés or Ramón" dislin.titlin...
1
by: adolfo | last post by:
I am at the very beginning of the DISLIN 9.3 Manual: 1.4 Quickplots Some quickplots are added to the DISLIN module which are collections of...
3
by: adolfo | last post by:
*** I thought I posted this subject 45 min ago but it does not show so something went wrong and it does not show up. Excuse me if I repeat myself ...
0
by: Helmut Michels | last post by:
Dear C/C++ programmers, I am pleased to announce version 9.4 of the data plotting software DISLIN. DISLIN is a high-level and easy to use...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.