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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,957ea3d057ecc0de X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.234.38 with SMTP id ub6mr3643578pbc.2.1336076712146; Thu, 03 May 2012 13:25:12 -0700 (PDT) Path: pr3ni502pbb.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: sbelmont700@gmail.com Newsgroups: comp.lang.ada Subject: Re: Help with my first GPRbuild file please Date: Thu, 3 May 2012 13:00:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: <27687929.0.1336075211401.JavaMail.geo-discussion-forums@vbsf10> References: <2622641.1774.1336074277508.JavaMail.geo-discussion-forums@vbq19> NNTP-Posting-Host: 206.53.78.59 Mime-Version: 1.0 X-Trace: posting.google.com 1336076712 26650 127.0.0.1 (3 May 2012 20:25:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 May 2012 20:25:12 +0000 (UTC) In-Reply-To: <2622641.1774.1336074277508.JavaMail.geo-discussion-forums@vbq19> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-05-03T13:00:11-07:00 List-Id: On Thursday, May 3, 2012 3:44:37 PM UTC-4, Patrick wrote: > Hi Everyone >=20 > I am trying to move a makefile to GPRbuild. I am having some trouble with= a C file. It includes the gstreamer library in some C code. In a Makefile = pkg-config is used. I tried putting `pkg-config --cflags gstreamer-0.10 --= libs gstreamer-0.10` in the compiler switches attribute but it failed. I tr= ied copying in the results of copying pkg-config into my gpr file but it fa= iled to. >=20 > If I copy the output when I run gpr: > gcc-4.4 -c -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/g= lib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 =20 > -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.= 0 -lrt -lglib-2.0 audio_player.c >=20 > It works just fine >=20 > Here is my gpr file: >=20 > project C_Mess is > for Languages use ( "C"); > for Source_Files use ("audio_player.c"); > package Compiler is >=20 > for Switches ("audio_player.c") use ("-pthread", > " -I/usr/include/glib-2.0", > " -I/usr/lib/x86_64-linux-gnu/gli= b-2.0/include", > " -I/usr/include/gstreamer-0.10",= =20 > "-I/usr/include/libxml2", > "-pthread", > " -lgstreamer-0.10", > " -lgobject-2.0", > " -lgmodule-2.0", > " -lxml2", > " -lgthread-2.0", > " -lrt", > " -lglib-2.0 " ) ; >=20 > end Compiler ; >=20 > end C_Mess; >=20 >=20 > Could someone help me firgure this out? If commands are being displayed, = are they not passed to the OS for execution? Why is the command failing wit= h GPRbuild but fine by itself? >=20 > Thanks for reading Because of the '-c' switch, the line you posted will only ever compile the = source, and not try and link it into an executable. GPRBuild, however, com= piles everything first (with the -c) and then tries to build everything tog= ether, which is probably what is failing in your case. Generally, it's mor= e convienent to use a separate 'externally built' library project file for = libraries instead of specifying link switches directly (which is rife with = ordering difficulties), but the actual error you get would help to clarify = things. -sb