From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yh0-x22b.google.com ([2607:f8b0:4002:c01::22b]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1Ypl6V-0003nX-Qp for ptxdist@pengutronix.de; Wed, 06 May 2015 00:14:16 +0200 Received: by yhrr66 with SMTP id r66so44973966yhr.3 for ; Tue, 05 May 2015 15:14:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 6 May 2015 00:14:08 +0200 Message-ID: From: =?UTF-8?Q?Alejandro_V=C3=A1zquez?= Subject: Re: [ptxdist] makefile to directFB and cairo List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0568359973==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============0568359973== Content-Type: multipart/alternative; boundary=001a113986605c365305155cff03 --001a113986605c365305155cff03 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I can solve the problem. i add in the makefile the next code: examplecairo:examplecairo.c $(CC) $^ -Wall `pkg-config --cflags --libs cairo directfb` -o $@ this way compile correctly 2015-04-23 11:18 GMT+02:00 Alejandro V=C3=A1zquez : > Hi!, > i am trying the compile of a example for the library directFB and other > for library cairo. I have isntall the libraries directFB and Cairo. > The first step: i create a new package type "src-make-prog". > 2: copy the example "hello world" in the new file "helloworld*.c" > 3: I modify the Makefile file and i add: > CFLAGS =3D -g -Wall -O2 -MD `pkg-config --cflags directfb` > LDFLAGS =3D -g -Wall -O2 `pkg-config --libs directfb` > > for cairo is the same but the flags are: > CFLAGS =3D -g -Wall -O2 -MD `pkg-config --cflags cairo` > LDFLAGS =3D -g -Wall -O2 `pkg-config --libs cairo` > > In both cases, the compiler say me: > undefined reference to `DirectFBInit', etc... > undefined reference to `cairo_image_surface_create',etc... > > Am I doing it the right way or I need something more to add? > > --001a113986605c365305155cff03 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!
I can solve the problem. i add in the makefile the= next code:
examplecairo:examplecairo.c
$(CC) $^ -Wall `pkg-config --cflag= s --libs cairo directfb` -o $@

this way comp= ile correctly


2015-04-23 11:18 GMT+02:00 Alejandro V=C3=A1zquez <v= azlup@gmail.com>:
Hi!,
i am trying the compile of a example for the library= directFB and other for library cairo. I have isntall the libraries directF= B and Cairo.
The first step: i create a new package type "sr= c-make-prog".
2: copy the example "hello world" in= the new file "helloworld*.c"
3: I modify the Makefile = file =C2=A0and i =C2=A0add:
CFLAGS =C2=A0 =3D -g -Wall -O2 -MD `p= kg-config --cflags directfb`
LDFLAGS =C2=A0=3D -g -Wall -O2 `pkg-= config --libs directfb`

for cairo is the same but = the flags are:
CFLAGS =C2=A0 =3D -g -Wall -O2 -MD `pkg-config --c= flags cairo`
LDFLAGS =C2=A0=3D -g -Wall -O2 `pkg-config --libs ca= iro`

In both cases, the compiler say me:=C2=A0
undefined reference to `DirectFBInit', etc...
undefine= d reference to `cairo_image_surface_create',etc...

=
Am I doing it the right way or I need something more to add?


--001a113986605c365305155cff03-- --===============0568359973== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --===============0568359973==--