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 10.13.225.6 with SMTP id k6mr12624390ywe.35.1464426171094; Sat, 28 May 2016 02:02:51 -0700 (PDT) X-Received: by 10.157.10.23 with SMTP id 23mr269583otg.12.1464426171051; Sat, 28 May 2016 02:02:51 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!q32no900054qgq.0!news-out.google.com!h125ni174ita.0!nntp.google.com!q6no2147222igz.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 28 May 2016 02:02:50 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1205:c6ad:3890:7849:fab0:c48f:4ba0; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:1205:c6ad:3890:7849:fab0:c48f:4ba0 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0d301d74-5ff1-4dcc-a4ca-972ef7064447@googlegroups.com> Subject: gnatmake vs gprbuild (win32, GPL 2014 and 2015) From: gautier_niouzes@hotmail.com Injection-Date: Sat, 28 May 2016 09:02:51 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:30503 Date: 2016-05-28T02:02:50-07:00 List-Id: Hello, On the same project file, I get a different behaviour at the link phase. - gnatmake succeeds [1] - gprbuild fails [2] Since gprbuild is meant to replace gnatmake over time, I'd like to have a successful linking with gprbuild. Detailed error messages below. So my question is: with which linker option can I fix that ? The problem shows up on both GNAT GPL 2014 and 2015 versions. TIA _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address ______ [1] gnatmake -d -PG:\g3d\demo\globe_3d_win32.gpr -XBuild_Mode=Debug g3dem_tb.ads gnatbind -E -x G:\g3d\obj\gnatdebg\g3dem_tb.ali gnatlink G:\g3d\obj\gnatdebg\g3dem_tb.ali -g -lopengl32 G:\g3d\demo\\../obj/libwin32/glee.o -lglu32 -lfreeglut -LG:\g3d\demo\\../obj/libwin32 -o G:\g3d\demo\g3dem_tb.exe [2016-05-28 10:46:10] process terminated successfully, elapsed time: 10.98s ______ [2] gprbuild -d -PG:\g3d\demo\globe_3d_win32.gpr -XBuild_Mode=Debug g3dem_tb.ads gcc g3dem_tb.o -g -lopengl32 G:\g3d\demo\\../obj/libwin32/glee.o -lglu32 -lfreeglut -LG:\g3d\demo\\../obj/libwin32 -o g3dem_tb.exe G:\g3d\demo\\../obj/libwin32/glee.o:glee.c:(.text+0xd): undefined reference to `wglGetProcAddress@4' G:\g3d\demo\\../obj/libwin32/glee.o:glee.c:(.text+0x1c34d): undefined reference to `wglGetProcAddress@4' G:\g3d\demo\\../obj/libwin32/glee.o:glee.c:(.text+0x1c369): undefined reference to `wglGetCurrentDC@0' h:/gnat/2014/bin/../libexec/gcc/i686-pc-mingw32/4.7.4/ld.exe: G:\g3d\demo\\../obj/libwin32/glee.o: bad reloc address 0x2db8 in section `.data' h:/gnat/2014/bin/../libexec/gcc/i686-pc-mingw32/4.7.4/ld.exe: final link failed: Invalid operation collect2.exe: error: ld returned 1 exit status gprbuild: link of g3dem_tb.ads failed [2016-05-28 10:47:19] process exited with status 4, 100% (59/59), elapsed time: 10.88s