From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:95ae:: with SMTP id b43mr1068011jai.4.1542235461957; Wed, 14 Nov 2018 14:44:21 -0800 (PST) X-Received: by 2002:a9d:2c22:: with SMTP id f31mr92930otb.4.1542235461486; Wed, 14 Nov 2018 14:44:21 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g188-v6no945379itg.0!news-out.google.com!y103-v6ni1103ita.0!nntp.google.com!g188-v6no945378itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 14 Nov 2018 14:44:21 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.28; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.28 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <75a4451a-c427-4ecd-a548-5b6dd610abfd@googlegroups.com> Subject: Globe_3D & OpenGL linking issues From: Shark8 Injection-Date: Wed, 14 Nov 2018 22:44:21 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 8496 X-Received-Body-CRC: 869075539 Xref: reader02.eternal-september.org comp.lang.ada:54823 Date: 2018-11-14T14:44:21-08:00 List-Id: I'm trying out Globe_3D and GID -- https://globe3d.sourceforge.io/ & https://gen-img-dec.sourceforge.io/ respectively -- building and running the demos has worked well. (GPRINSTALL worked w/o a hitch, after I remembered the -P parameter.) But now, trying to use Globe_3D (in a separate project, importing Globe_3D) I'm unable to get things to link; the errors that I get are along the lines of: d:/programming/gnat/2018/bin/../libexec/gcc/x86_64-pc-mingw32/7.3.1/ld.exe: skipping incompatible D:\Programming\Libraries\GLOBE_3D\\obj/libwin32/opengl32.lib when searching for -lopengl32 d:/programming/gnat/2018/bin/../libexec/gcc/x86_64-pc-mingw32/7.3.1/ld.exe: skipping incompatible D:\Programming\Projects\Space\obj\/opengl32.lib when searching for -lopengl32 ... d:/programming/gnat/2018/bin/../libexec/gcc/x86_64-pc-mingw32/7.3.1/ld.exe: cannot find -lfreeglut collect2.exe: error: ld returned 1 exit status Any ideas? ------------------- -- It's going to be a little solar-system demo. -- Ada_Space GPR with "globe_3d.gpr"; project Ada_Space is for Source_Dirs use ("src"); for Object_Dir use "obj"; for Main use ("space.adb"); for Exec_Dir use "."; package Ide is for Artifacts_Dir use "ali"; for Documentation_Dir use "doc"; end Ide; end Ada_Space; ------------------- -- Globe_3D GPR project Globe_3D is type OS_Kind is ("win32", "linux", "macosx"); OS : OS_Kind := external ("OS_Kind", "win32"); type Build_Mode_Type is ("debug", "fast", "small"); Build_Mode : Build_Mode_Type := external ("Build_Mode", "debug"); Binder_Options := (); Style_Options := ("-gnatyaknpr", -- Check all casings: a:attribute, k:keywords, n:package Standard identifiers, p:pragma, r:identifier references. "-gnatybfhiu", -- Check b:no blanks at end of lines, f:no ff/vtabs, h: no htabs, i:if-then layout, u:no unnecessary blank lines. "-gnatyO", -- Check that overriding subprograms are explicitly marked as such. "-gnatye", -- Check that labels on end statements (ending subprograms), and on exit statements (exiting named loops), are present. "-gnatyx"); -- Check x:no extra parens. Compiler_Options := ("-gnat12", "-gnatwa", "-fno-strict-aliasing") & Style_Options; Fast_Options := ("-O2", "-gnatn", "-gnatp", "-funroll-loops", "-fpeel-loops", "-ftracer", "-funswitch-loops", "-fweb", "-frename-registers"); Small_Options := ("-Os", "-gnatp", "-fno-inline", "-march=i386", "-ffunction-sections", "-falign-jumps=0", "-falign-loops=0", "-falign-functions=0", "-mpreferred-stack-boundary=2"); case Build_Mode is when "debug" => Binder_Options := Binder_Options & "-E"; Compiler_Options := Compiler_Options & "-gnato" & "-fstack-check" & "-g"; case OS is when "linux" => Compiler_Options := Compiler_Options & "-gnatVa"; when "win32" => Compiler_Options := Compiler_Options & "-fno-inline" & "-gnatVcdeimoprst"; -- & "-gnatVf" -- (2016) turned off floating point validity check, seems to give false positives on a scalar product for collision detection when "macosx" => null; end case; when "fast" => case OS is when "linux" => Compiler_Options := Compiler_Options & Fast_Options & "-fomit-frame-pointer"; when "win32" => Compiler_Options := Compiler_Options & Fast_Options & "-fipa-cp-clone" & "-fgcse-after-reload" & "-ftree-vectorize" & "-mfpmath=sse" & "-msse3"; when "macosx" => null; end case; when "small" => case OS is when "linux" => Compiler_Options := Compiler_Options & Small_Options & "-fdata-sections"; when "win32" => Compiler_Options := Compiler_Options & Small_Options; when "macosx" => null; end case; end case; case OS is when "macosx" => Compiler_Options := Compiler_Options & "-gnatf" & "-gnatE" & "-gnatVcfimorst" & "-gnatyhiknp"; when "linux" => Binder_Options := Binder_Options & "-static"; when "win32" => null; end case; for Library_Name use "globe3d"; for Library_Dir use "lib/gnat_" & external ("Build_Mode", "debug"); for Library_Ali_Dir use "lib/gnat_" & external ("Build_Mode", "debug"); for Object_Dir use "obj/gnat_" & external ("Build_Mode", "debug"); for Source_Dirs use ("bindings", "bindings/" & external ("OS_Kind", "win32"), "src/**"); package Ide is case OS is when "linux" => for Default_Switches ("adacontrol") use ("-Ftgnat_short"); when "win32" => for Default_Switches ("adacontrol") use ("-F", "gnat_short"); when "macosx" => for Default_Switches ("adacontrol") use (); end case; end Ide; package Builder is for Default_Switches ("ada") use ("-C", "-j5"); case Build_Mode is when "debug" => for Global_Configuration_Pragmas use "obj/debug.pra"; when "fast" => null; when "small" => null; end case; end Builder; package Compiler is for Default_Switches ("ada") use Compiler_Options; end Compiler; package Binder is for Default_Switches ("ada") use Binder_Options; end Binder; package Linker is case OS is when "linux" => for Linker_Options use ("-g", "-lGL", "-lGLU", "-lglut"); when "win32" => for Linker_Options use ("-g", "-Wl,--gc-sections", "obj/libwin32/glee.o", "-lopengl32", "-lglu32", "-lfreeglut", "-Lobj/libwin32", "-Xlinker", "--stack=0x40000000,0x400000"); when "macosx" => for Linker_Options use ("-g", "-bind_at_load", "-framework", "/GLUT", "-framework", "/OpenGL", "-lm"); end case; end Linker; end Globe_3D;