Imagination PowerVR SDK Blog

Compiling demos


I am new to graphics development. I have a board with mpc5121e processor(with mbx core). I want to compile demos in the sdk for my card(embedded linux). I followed the instructions for linux. I copied the necessary so files into OGLESlinuxPPCLib ; and run " make PLATFORM=LinuxPPC". It compiles most of the object files but at some point it gives the following errors:

…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInit::OsReleaseOS()':<br>PVRShellOS.cpp:(.text+0x11c): undefined reference toXCloseDisplay’
…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInit::OsRenderComplete()':<br>PVRShellOS.cpp:(.text+0x17c): undefined reference toXPending’
PVRShellOS.cpp:(.text+0x1d0): undefined reference to XNextEvent'<br>PVRShellOS.cpp:(.text+0x1f0): undefined reference toXGetAtomName’
…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInit::OsPixmapCopy()':<br>PVRShellOS.cpp:(.text+0x2ec): undefined reference toXCopyArea’
…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInitOS::OpenX11Window(PVRShell const&amp;)':<br>PVRShellOS.cpp:(.text+0x57c): undefined reference toXMatchVisualInfo’
PVRShellOS.cpp:(.text+0x5b4): undefined reference to XCreateColormap'<br>PVRShellOS.cpp:(.text+0x628): undefined reference toXCreateWindow’
PVRShellOS.cpp:(.text+0x66c): undefined reference to XSetStandardProperties'<br>PVRShellOS.cpp:(.text+0x678): undefined reference toXMapWindow’
PVRShellOS.cpp:(.text+0x690): undefined reference to XIfEvent'<br>PVRShellOS.cpp:(.text+0x6a4): undefined reference toXInternAtom’
PVRShellOS.cpp:(.text+0x6bc): undefined reference to XSetWMProtocols'<br>PVRShellOS.cpp:(.text+0x6d0): undefined reference toXSetWMColormapWindows’
PVRShellOS.cpp:(.text+0x6d8): undefined reference to XFlush'<br>../LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In functionPVRShellInit::OsInitOS()’:
PVRShellOS.cpp:(.text+0x764): undefined reference to XOpenDisplay'<br>PVRShellOS.cpp:(.text+0x774): undefined reference toXDefaultScreen’
PVRShellOS.cpp:(.text+0x7fc): undefined reference to XCreatePixmap'<br>PVRShellOS.cpp:(.text+0x814): undefined reference toXCreateGC’
PVRShellOS.cpp:(.text+0x868): undefined reference to XDisplayWidth'<br>PVRShellOS.cpp:(.text+0x880): undefined reference toXDisplayHeight’
…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInitOS::CloseX11Window()':<br>PVRShellOS.cpp:(.text+0x95c): undefined reference toXDestroyWindow’
PVRShellOS.cpp:(.text+0x968): undefined reference to XFreeColormap'<br>PVRShellOS.cpp:(.text+0x978): undefined reference toXFree’
…/LinuxPPC/ReleaseX11Lite/PVRShellOS.o: In function PVRShellInit::OsDoReleaseAPI()':<br>PVRShellOS.cpp:(.text+0x9c4): undefined reference toXFreePixmap’
PVRShellOS.cpp:(.text+0x9d0): undefined reference to XFreeGC'<br>/usr/local/SDKPackage/Builds/OGLES/LinuxPPC/Lib/ undefined reference tosprintf@GLIBC_2.4’
/usr/local/SDKPackage/Builds/OGLES/LinuxPPC/Lib/ undefined reference to `printf@GLIBC_2.4’
collect2: ld returned 1 exit status
make: *** […/LinuxPPC/ReleaseX11Lite/OGLESChameleonMan] Error 1

I think it cannot find the X11 libraries although i defined X11ROOT = /usr/include/X11 in the .mak file. Actually , the question is that why does it ask for X11 libraries? There is no X11 in my embedded board. What should i do to fix that problem?

Thanks in advance…




Firstly, sorry it has taken so long to respond.


I know when we provided the SDK to freescale the platform for the SDK was defined to be 'LinuxMPC512' (not LinuxPPC) so it is possible you're using the wrong platform but it is also possible that it has been changed by freescale.


Assuming the platform is correct as far as I can tell it should only build for X11 if X11BUILD is defined. Is it possible this has been defined?