Closed Rodeo-McCabe closed 4 years ago
From OpenGL.gpr
:
package Linker is
case Windowing_System is
when "windows" =>
for Linker_Options use ("-lOpenGL32", "-lGdi32");
when "x11" =>
for Linker_Options use ("-lGL", "-lX11");
when "quartz" =>
for Linker_Options use
("-Wl,-framework,OpenGL,-framework,CoreFoundation");
end case;
end Linker;
I'm wondering if the -f
is coming from -framework
which suggests that you have the quartz
option selected which, I think, only applies to Mac systems?
Possibly, you should select x11
?
Ah, so it appears the examples (and I suppose also any projects using OpenGLAda) also need be compiled with the Windowing_System
scenario variable set on the command line.
To save myself the trouble I modified the default value in opengl.gpr:
type Windowing_System_Type is
("windows", "x11", "quartz");
-- has a default so that the project can be opened in GPS.
Windowing_System : Windowing_System_Type
:= external ("Windowing_System", "x11"); -- second param here
Then I rebuilt/installed and everything works as expected. Thanks for the comment ;)
Compiling any example fails with the following error:
It seems this option is being passed to the linker from the Compiler package in opengl.gpr. Removing the
f
there, clean building and reinstalling doesn't fix the problem. I also tried adding a Linker package in the example project file, with-shared
switch, but it failed because it can't find the shared libs (probably expected). I also tried with OpenGLAda in both release and debug modes (clean building and reinstalling), but no change.I can't find what the
-f
switch is even supposed to do. Any help is appreciated.