Ada GPS IDE似乎找不到GtkAda [英] Ada GPS IDE can't seem to find GtkAda

查看:158
本文介绍了Ada GPS IDE似乎找不到GtkAda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了GNAT编程工作室(GPS)和GtkAda.它们似乎都可以正常工作,但是当我尝试从Template的New Project下构建Simple Window项目时,出现一堆错误,提示找不到文件gtk.ads".这似乎是目录/相关性的问题-GPS不知道在哪里寻找GtkAda.我正在运行Windows 7,并在C:\ GNAT \ 2011上安装了GPS,并在C:\ GtkAda上安装了GtkAda.我尝试将GtkAda添加到我的PATH中;目前,我的PATH用户变量包括C:\ GNAT \ 2011 \ bin,而我的路径系统变量包括C:\ GtkAda \ bin.对于解决此问题的任何建议,我们将不胜感激!

I have installed both the GNAT Programming Studio (GPS) and GtkAda. They both seem to work fine, but when I try to build the Simple Window project under New Project from Template, I get a bunch of errors saying "file gtk.ads not found." This seems to be a directory/dependency sort of problem - GPS doesn't know where to look for GtkAda. I'm running Windows 7, and have GPS installed at C:\GNAT\2011, and GtkAda installed at C:\GtkAda. I tried adding GtkAda to my PATH; at the moment my PATH user variable includes C:\GNAT\2011\bin, and my Path System variable includes C:\GtkAda\bin. Any advice on resolving this problem is greatly appreciated!

推荐答案

这里有两件事.

首先,项目"是关键.每当您构建依赖于某些东西的东西时 在像GtkAda这样的库上,如果(a)使用GNAT,则要容易得多 专案来管理,以及(b)您使用图书馆提供的GPR -当然,总要假设是这样.

First, "project" is key. Whenever you're building something that depends on a library like GtkAda, it's much much easier if (a) you use GNAT Project to manage it, and (b) you use the GPR(s) provided by the library - always assuming it does, of course.

就GtkAda而言,这意味着您的GPR需要与GtkAda一起使用;

In the case of GtkAda, that means that your GPR needs to "with" GtkAda;

with "gtkada";
project Tinkering is
   ...

第二个,gnatmake或gprbuild必须能够找到gtkada.gpr.

Second, gnatmake or gprbuild needs to be able to find gtkada.gpr.

最简单的方法是使用gtkada.gpr的方式安装GtkAda gnatmake/gprbuild期望找到GPR文件的默认位置.这 是$prefix/lib/gnat. GtkAda遵守此约定,因此您可以安装 GtkAda与编译器位于同一根目录下.我不知道为什么仍然不建议这样做.

The easiest way is to install GtkAda in such a way that gtkada.gpr is in the default place that gnatmake/gprbuild expect to find GPR files. This is $prefix/lib/gnat. GtkAda obeys this convention, so you could install GtkAda under the same root as your compiler. I don't know why that's not recommended anyway.

如果您不想这样做,可以将正确的位置添加到 环境变量ADA_PROJECT_PATH,例如在您的情况下进行设置 到C:\GtkAda\lib\gnat.

If you don't want to do that, you can add the correct location to the environment variable ADA_PROJECT_PATH, for example in your case set it to C:\GtkAda\lib\gnat.

GtkAda自述文件中有很多好东西,位于 libre.adacore.com , 我看到的 GtkAda用户指南自述文件中的内容也包含在 已安装的软件包(在您的情况下)为C:\GtkAda\doc\GtkAda\gtkada_ug.

There is a lot of good stuff in the GtkAda README at libre.adacore.com, and in the GtkAda User's Guide which I see from the README is also included with the installed package at (in your case) C:\GtkAda\doc\GtkAda\gtkada_ug.

这篇关于Ada GPS IDE似乎找不到GtkAda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆