# compiling problem

**URL:** <https://forums.imgtec.com/t/compiling-problem/2084>\
**Category:** PowerVR Insider\
**Created:** [May 23, 2014, 9:54am UTC](https://forums.imgtec.com/t/compiling-problem/2084 "2014-05-23T09:54:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aicha11](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@aicha11](https://forums.imgtec.com/u/aicha11)\
**Post date:** [May 23, 2014, 9:54am UTC](https://forums.imgtec.com/t/compiling-problem/2084/1 "2014-05-23T09:54:31Z")

</div>

hi,  
  
  
  
when I run the examples of powervr sdk on ubuntu 12.04 I got this error  
  
  
  
…/Linux\_x86\_32/ReleaseNullWS/PVRShellOS.o: In function `PVRShellInit::OsRenderComplete()':<br /> PVRShellOS.cpp:(.text+0x64): undefined reference to`XPending’  
  
PVRShellOS.cpp:(.text+0x83): undefined reference to `XNextEvent'<br /> PVRShellOS.cpp:(.text+0xaf): undefined reference to`XGetAtomName’  
  
PVRShellOS.cpp:(.text+0xc0): undefined reference to `XFree'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function`PVRShellInit::OsPixmapCopy()’:  
  
PVRShellOS.cpp:(.text+0x3d7): undefined reference to `XCopyArea'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function`PVRShellInit::OsInit()’:  
  
PVRShellOS.cpp:(.text+0x5a4): undefined reference to `XInitThreads'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function`PVRShellInitOS::OpenX11Window(PVRShell const&)’:  
  
PVRShellOS.cpp:(.text+0x7a7): undefined reference to `XMatchVisualInfo'<br /> PVRShellOS.cpp:(.text+0x7e0): undefined reference to`XCreateColormap’  
  
PVRShellOS.cpp:(.text+0x7f4): undefined reference to `XDisplayWidth'<br /> PVRShellOS.cpp:(.text+0x807): undefined reference to`XDisplayHeight’  
  
PVRShellOS.cpp:(.text+0x8eb): undefined reference to `XCreateWindow'<br /> PVRShellOS.cpp:(.text+0x93f): undefined reference to`XSetStandardProperties’  
  
PVRShellOS.cpp:(.text+0x950): undefined reference to `XMapWindow'<br /> PVRShellOS.cpp:(.text+0x974): undefined reference to`XIfEvent’  
  
PVRShellOS.cpp:(.text+0x997): undefined reference to `XInternAtom'<br /> PVRShellOS.cpp:(.text+0x9c2): undefined reference to`XSetWMProtocols’  
  
PVRShellOS.cpp:(.text+0x9e2): undefined reference to `XSetWMColormapWindows'<br /> PVRShellOS.cpp:(.text+0x9ec): undefined reference to`XFlush’  
  
PVRShellOS.cpp:(.text+0xa16): undefined reference to `XInternAtom'<br /> PVRShellOS.cpp:(.text+0xa32): undefined reference to`XInternAtom’  
  
PVRShellOS.cpp:(.text+0xab3): undefined reference to `XSendEvent'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function`PVRShellInit::OsInitOS()’:  
  
PVRShellOS.cpp:(.text+0xaff): undefined reference to `XOpenDisplay'<br /> PVRShellOS.cpp:(.text+0xb12): undefined reference to`XDefaultScreen’  
  
PVRShellOS.cpp:(.text+0xb24): undefined reference to `XDisplayWidth'<br /> PVRShellOS.cpp:(.text+0xb38): undefined reference to`XDisplayHeight’  
  
PVRShellOS.cpp:(.text+0xbd0): undefined reference to `XCreatePixmap'<br /> PVRShellOS.cpp:(.text+0xbf5): undefined reference to`XCreateGC’  
  
…/Linux\_x86\_32/ReleaseNullWS/PVRShellOS.o: In function `PVRShellInitOS::CloseX11Window()':<br /> PVRShellOS.cpp:(.text+0xcc5): undefined reference to`XDestroyWindow’  
  
PVRShellOS.cpp:(.text+0xcd6): undefined reference to `XFreeColormap'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function`PVRShellInit::OsDoReleaseAPI()’:  
  
PVRShellOS.cpp:(.text+0xd2a): undefined reference to `XFreePixmap'<br /> PVRShellOS.cpp:(.text+0xd3c): undefined reference to`XFreeGC’  
  
…/Linux\_x86\_32/ReleaseNullWS/PVRShellOS.o: In function `PVRShellInit::OsReleaseOS()':<br /> PVRShellOS.cpp:(.text+0x2c): undefined reference to`XCloseDisplay’  
  
collect2: ld returned 1 exit status  
  
make: \*\*\* […/Linux\_x86\_32/ReleaseNullWS/OGLESIntroducingPVRShell] Error 1

---

<div class="post-metadata">

**Author:** ![ChrisPenrose](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@ChrisPenrose](https://forums.imgtec.com/u/ChrisPenrose)\
**Post date:** [May 23, 2014, 1:52pm UTC](https://forums.imgtec.com/t/compiling-problem/2084/2 "2014-05-23T13:52:33Z")

</div>

Hi aicha  
  
  
  
To build and run an SDK example on desktop Linux, you need to explictly tell the makefiles to compile the app using X11 as the window system, for example:  
  
  
  
`make PLATFORM=Linux_x86_32 X11BUILD=1 X11ROOT=/usr`

---

<div class="post-metadata">

**Author:** ![aicha11](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@aicha11](https://forums.imgtec.com/u/aicha11)\
**Post date:** [May 23, 2014, 6:17pm UTC](https://forums.imgtec.com/t/compiling-problem/2084/3 "2014-05-23T18:17:12Z")

</div>

thanks a lot the examples are well running 😃
