1

I got GPS community edition, but it can't create GtkADA projects. So I cloned and built GtkADA using the GPR projects, but when I try to open a GtkADA example or start a new GtkADA project from GPS, I get the error:

unknown project file: "gtkada"

Edit: Windows 10 x64, trying to "get into" Ada.

Edit2: Got farther. I tried setting GPR_PROJECT_PATH to include the following paths:

drive:\gitrepos\gtkada\src
drive:\gitrepos\gtkada\src\lib
drive:\gitrepos\gtkada\src\lib\gtkada\relocatable
drive:\gitrepos\gtkada\src\obj

I am trying to run the base widget example, downloaded from https://www.adacore.com/code-samples for GtkAda.

Now I get:

file "gdk-gc.ads" not found

Indeed I cannot find this file in either the GNAT or GtkAda repo.

Edit2: I am still having difficulty.

Edit3: Other people on freenode#ada were saying the OpenGL part of GtkAda is broken, and many people simply disable it.

trayres
  • 522
  • 2
  • 6
  • 18
  • What OS? Where did you install GtkAda? This looks like a duplicate of https://stackoverflow.com/questions/7464251/ada-gps-ide-cant-seem-to-find-gtkada?rq=1 – Simon Wright Mar 26 '19 at 08:03
  • Did you install in the same directory structure as Gnat ? If not, you can use the environment variable ADA_PROJECT_PATH. See https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/building_with_gprbuild.html – Frédéric Praca Mar 26 '19 at 08:05
  • Or use the -aP parameter for gprbuild – Frédéric Praca Mar 26 '19 at 08:07
  • 2
    @FrédéricPraca Using `GPR_PROJECT_PATH` instead of `ADA_PROJECT_PATH` [is recommended](https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/gnat_project_manager.html#index-56). – flyx Mar 26 '19 at 09:34
  • @trayres I'm not really sure these examples are still up to date with the current Gtkada. But in the sources of Gtkada, there are samples that could be of interest. – Frédéric Praca Mar 27 '19 at 15:50
  • I tried to build the test, but apparently it can't find view_gl.adb. – trayres Mar 28 '19 at 12:49
  • Just to give it a shot, I tried with MSYS2 x64 bit as well; I have pango x64 installed, but it still failed to link. Does this expect x32 only? – trayres Mar 28 '19 at 13:06

1 Answers1

2

I had the same problem and couldn't find Gtkada (about gdk-gc.ads I can't help you).

Therefore I wrote the relative path from my project file to GtkAda.gpr

with "../../lib/gnat/gtkada"; -- on linux (I installed my gtkada into my gnat folder)

In your case, if you installed it on C:\GtkAda you should search for GtkAda.gpr, then copy paste its path. (Not sure if absolute path works. You will maybe need to tell your project to search outside of its folders by using ".." until you are in C:, then paste your path.)

PS: Adacore provides a GtkAda installer for windows: https://www.adacore.com/download/more

Edit: On my windows, I simply used the installer then with "gtkada" worked.