From: Felix Krause <usenet@flyx.org>
Subject: Re: ANN: OpenGLAda 0.3 and OpenCLAda 0.1 released
Date: Tue, 31 Dec 2013 13:45:28 +0100
Date: 2013-12-31T13:45:28+01:00 [thread overview]
Message-ID: <52c2bc68$0$32113$2c885b36@post.eweka.nl> (raw)
In-Reply-To: 7a18f1ac-d881-4daf-bfa0-d0b8aafecb4e@googlegroups.com
On 2013-12-26 18:03:26 +0000, Marius Amado-Alves said:
> It builds and runs, but I'd like to sanitize the process.
> The project
>
> with "OpenGLAda-0.3/opengl-glfw";
> project Test is
> for Main use ("test");
> end Test;
>
> gives error: gl.ali not found, gl.adb must be compiled.
I also stumbled upon this problem. I don't know what's the cause, but
it seems like this is a problem with gnatmake. gl.ali should be copied
into OpenGLAda-0.3/lib (where GNAT searches for it), but it is not for
some reason. If you compile the project with gprbuild instead, it works
as expected. Perhaps someone with more knowledge about
gnatmake/gprbuild can comment on that?
> If we tell GNAT where they are
>
> with "OpenGLAda-0.3/opengl-glfw";
> project Test is
> for Object_Dir use "OpenGLAda-0.3/obj";
> for Main use ("test");
> end Test;
>
> it works, but a few problems (my poor command of the GNAT Project
> language no doubt):
>
> 1.
> Why do we have to tell GNAT the "OpenGLAda-0.3/obj" path? shouldn't the
> OpenGLAda project files know that?
What happens when you do that is that GNAT does not need the gl.ali
file in the OpenGLAda-0.3/lib directory, because it's available
directly in the directory where the object files of your code are
placed into. This is a *very* dirty hack and I don't think it's
guaranteed to work.
> 2.
> The executable gets created inside that path, whereas I wanted it in
> the base project dir.
You can set "Exec_Dir", which defaults to "Object_Dir" if you don't set it.
> 3.
> The OpenGlAda project files expect external scenario parameters; I am
> using command line options -X
> gnatmake -Ptest -Xwindowing_system=windows -Xglfw_version=3
> is it possible to set these params in the project file (test.gpr)?
> (Two avoid having options in two places, command line, project file.)
Currently not. I admit that it was a bad decision to take the GLFW
version as scenario parameter, and I will revise this in the next
release. As GLFW 2 and 3 are completely incompatible, the decision
which one will be used is made in the development stage, not in the
compilation stage. Therefore, there should be two projects,
opengl-glfw2.gpr and opengl-glfw3.gpr.
On the other hand, Windowing_System is about platform independence. If
you set it in your project file (you actually cannot do that, btw),
your project will only compile on the platform you chose. Therefore, it
is a scenario variable so that the platform can be chosen when
compiling the project.
--
Felix Krause
http://flyx.org/
prev parent reply other threads:[~2013-12-31 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 21:37 ANN: OpenGLAda 0.3 and OpenCLAda 0.1 released Felix Krause
2013-11-20 16:49 ` Marius Amado-Alves
2013-11-20 20:13 ` Felix Krause
2013-11-21 0:53 ` Shark8
2013-11-22 14:06 ` Marius Amado-Alves
2013-11-22 16:59 ` Felix Krause
2013-11-25 15:28 ` Marius Amado-Alves
2013-11-27 10:40 ` Marius Amado-Alves
2013-11-29 18:51 ` Felix Krause
2013-12-02 13:56 ` Marius Amado-Alves
2013-12-26 18:03 ` Marius Amado-Alves
2013-12-31 12:45 ` Felix Krause [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox