sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 55 forks source link

how do I get a working C development environment #22

Closed stuartmacg closed 8 years ago

stuartmacg commented 8 years ago

Using Ubuntu. Installed python-gr to obtain code - no clear way to get C stuff without python or julia. Built griddata example: cc griddata.c -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm -o griddata Added: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gr/lib Did a symbolic link to fix missing fonts error: sudo ln -s /usr/local/gr /opt/gr Finally get the message: GKS: X11 support not compiled in

How can I get the C use of GR working - is there a doc somewhere?

jheinen commented 8 years ago

As a temporary solution, please unpack the following tar file in /usr/local:

cd /usr/local
wget http://pgi-jcns.fz-juelich.de/gr/downloads/gr.tgz
tar xf gr.tar

and try to build griddata.c:

cc griddata.c -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm -Wl,-rpath,/usr/local/gr/lib
./a.out
stuartmacg commented 8 years ago

That works, thank you :-). Will we get a way to obtain a C/Fortran library only package in future? I do some large C++ software which I do not really want to mix with interpreters, and there seem to be no (other) clean, easily used, comprehensive packages available for maths plotting.

PS thanks for a really nice plot package.

cfelder commented 8 years ago

I have created a pre-release gr_0.18.0~57.0647ffb package. If you have already included the science:gr-framework on your machine you can easily install the package with apt-get install gr. The gr-framework will be installed into a single directory /usr/gr.

The message GKS: X11 support not compiled in indicates that some build requirements for your Ubuntu distribution have not been fulfilled on our build system. Can you please provide some more information about the Ubuntu version you are using, e.g. posting output of lsb_release -a here?

stuartmacg commented 8 years ago

I downloaded the source package and built using cmake and all works thanks.

More C++ examples would be nice - but I can get by with what there is - it is easier to look at examples and change them to fit desired use, using reference docs, than to design from scratch.

On 30/06/16 07:10, cfelder wrote:

I have created a pre-release |gr_0.18.0~57.0647ffb| package. If you have already included the science:gr-framework on your machine you can easily install the package with |apt-get install gr|. The gr-framework will be installed into a single directory |/usr/gr|.

The message |GKS: X11 support not compiled in| indicates that some build requirements for your Ubuntu distribution have not been fulfilled on our build system. Can you please provide some more information about the Ubuntu version you are using, e.g. posting output of |lsb_release -a| here?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jheinen/gr/issues/22#issuecomment-229568197, or mute the thread https://github.com/notifications/unsubscribe/AS91SsOj812dLEhHf8WIYaZmnoOpIm3Oks5qQ13DgaJpZM4IzwJf.