![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i Execute DirectFB programs on Ubuntu | Ravikishore | Ubuntu | 15 | 10-05-2009 07:42 PM |
| Executing a Java Program | hypnotic_meat | Shell Programming and Scripting | 2 | 04-16-2009 10:15 AM |
| Trubble in executing the cpp program... | ps_sach | High Level Programming | 3 | 10-21-2008 10:04 AM |
| Executing an .ec program in different informix versions | matrixmadhan | High Level Programming | 0 | 05-21-2005 06:29 AM |
| executing the su command from a java program. | shailendrat | UNIX for Dummies Questions & Answers | 1 | 03-24-2005 12:27 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi ,
I am getting error while executing Directfb program on ubuntu ,, my program is : #include <stdio.h> #include <unistd.h> #include <directfb.h> static IDirectFB *dfb = NULL; static IDirectFBSurface *primary = NULL; static int screen_width = 0; static int screen_height = 0; #define DFBCHECK(x...) { DFBResult err = x; if (err != DFB_OK) { fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); DirectFBErrorFatal( #x, err ); } } int main (int argc, char **argv) { int i; DFBSurfaceDescription dsc; IDirectFBImageProvider *provider; DFBCHECK (DirectFBInit (&argc, &argv)); DFBCHECK (DirectFBCreate (&dfb)); DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN)); dsc.flags = DSDESC_CAPS; dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary )); DFBCHECK (primary->GetSize (primary, &screen_width, &screen_height)); DFBCHECK (dfb->CreateImageProvider (dfb, DATADIR"/dfblogo.png", &provider)); DFBCHECK (provider->GetSurfaceDescription (provider, &dsc)); DFBCHECK (dfb->CreateSurface( dfb, &dsc, &logo )); DFBCHECK (provider->RenderTo (provider, logo, NULL)); provider->Release (provider); for (i = -dsc.width; i < screen_width; i++) { DFBCHECK (primary->FillRectangle (primary, 0, 0, screen_width, screen_height)); DFBCHECK (primary->Blit (primary, logo, NULL, i, (screen_height - dsc.height) / 2)); DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC)); } logo->Release (logo); primary->Release (primary); dfb->Release (dfb); return 23; } im compiling this program by root@lxdevenv:~/Desktop# gcc a.c -o a -I/usr/local/include/directfb -L/usr/local/include/lib -lX11 -lXi -lXmu -lglut -lGL -lGLU i am getting the following Error as below root@lxdevenv:~/Desktop# gcc a.c -o a -I/usr/local/include/directfb -L/usr/local/include/lib -lX11 -lXi -lXmu -lglut -lGL -lGLU a.c:15: error: expected identifier or ( before { token a.c:21: error: stray # in program a.c: In function main: a.c:39: error: expected ; before dsc a.c:58: error: logo undeclared (first use in this function) a.c:58: error: (Each undeclared identifier is reported only once a.c:58: error: for each function it appears in.) root@lxdevenv:~/Desktop# guide me how to compile this program.. any answer will appreciated......... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|