i'm having some troubles when trying to compile Ada code in GPS. GPS says is missing when I include it on a package. I tried installing with apt-get, and it does, but the error is still there. What can I do next? I'm running GPS on a x64 Ubuntu 12.04.
Here's the error message I got:
gprbuild -d -P/media/LUISMUNYOZ/QUINTO/str/pendulum/pendulum_portatil/pendulum.gpr -XEXTRA=True -XOPENGL=True -XGNOME=True -XBUILD=Production print_barrier_sync.adb contrib.gpr:1:09: warning: no compiler specified for language "Xml", ignoring all its sources x86_64-pc-linux-gnu-gcc -c lw.c In file included from /media/LUISMUNYOZ/QUINTO/str/pendulum/pendulum_portatil/gtkada/testgtk/opengl/lw.c:20:0: /media/LUISMUNYOZ/QUINTO/str/pendulum/pendulum_portatil/gtkada/testgtk/opengl/lw.h:23:18: fatal error: glib.h: No such file or directory compilation terminated. gprbuild:* compilation phase failed [2012-11-21 13:24:47] process exited with status 4 (elapsed time: 02.06s) [2012-11-21 13:24:56] Could not locate executable on path: svn SVN error: […]
The error triggers at this point:
#ifndef LW_H
#define LW_H
#include <glib.h> <------------------------------------------
#include <GL/gl.h>
#define LW_MAX_POINTS 200
#define LW_MAX_NAME_LEN 500
The file is lw.h, which is defined in the package GtkAda. I downloaded it from GPS page.
I'd pursue @Simon's approach, but a work-around based on 2.4.2. Using the command line might be a temporary alternative while you sort out the underlying problem.
As you are using linux, here's a
Makefile
for the basicInteraction
demo.For reference, these packages were installed on Ubuntu 12.04:
I've never used GtkAda. However ... I googled
glib.h
and got many hits, suggesting that for plain C builds one should use - for example, from this StackOverflow question -However, we're talking
gprbuild
here, so perhaps the GtkAda documentation is relevant? It says you need to includewith "gtkada";
in your GNAT Project file, and include the location ofgtkada.gpr
on yourADA_PROJECT_PATH
if it isn't there already (see the output ofgnatls -v
).If you've already done that, please show us the GPR file.