Imagination PowerVR SDK Blog

compiling problem


#1

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 toXPending’

PVRShellOS.cpp:(.text+0x83): undefined reference to XNextEvent'<br /> PVRShellOS.cpp:(.text+0xaf): undefined reference toXGetAtomName’

PVRShellOS.cpp:(.text+0xc0): undefined reference to XFree'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In functionPVRShellInit::OsPixmapCopy()’:

PVRShellOS.cpp:(.text+0x3d7): undefined reference to XCopyArea'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In functionPVRShellInit::OsInit()’:

PVRShellOS.cpp:(.text+0x5a4): undefined reference to XInitThreads'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In functionPVRShellInitOS::OpenX11Window(PVRShell const&)’:

PVRShellOS.cpp:(.text+0x7a7): undefined reference to XMatchVisualInfo'<br /> PVRShellOS.cpp:(.text+0x7e0): undefined reference toXCreateColormap’

PVRShellOS.cpp:(.text+0x7f4): undefined reference to XDisplayWidth'<br /> PVRShellOS.cpp:(.text+0x807): undefined reference toXDisplayHeight’

PVRShellOS.cpp:(.text+0x8eb): undefined reference to XCreateWindow'<br /> PVRShellOS.cpp:(.text+0x93f): undefined reference toXSetStandardProperties’

PVRShellOS.cpp:(.text+0x950): undefined reference to XMapWindow'<br /> PVRShellOS.cpp:(.text+0x974): undefined reference toXIfEvent’

PVRShellOS.cpp:(.text+0x997): undefined reference to XInternAtom'<br /> PVRShellOS.cpp:(.text+0x9c2): undefined reference toXSetWMProtocols’

PVRShellOS.cpp:(.text+0x9e2): undefined reference to XSetWMColormapWindows'<br /> PVRShellOS.cpp:(.text+0x9ec): undefined reference toXFlush’

PVRShellOS.cpp:(.text+0xa16): undefined reference to XInternAtom'<br /> PVRShellOS.cpp:(.text+0xa32): undefined reference toXInternAtom’

PVRShellOS.cpp:(.text+0xab3): undefined reference to XSendEvent'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In functionPVRShellInit::OsInitOS()’:

PVRShellOS.cpp:(.text+0xaff): undefined reference to XOpenDisplay'<br /> PVRShellOS.cpp:(.text+0xb12): undefined reference toXDefaultScreen’

PVRShellOS.cpp:(.text+0xb24): undefined reference to XDisplayWidth'<br /> PVRShellOS.cpp:(.text+0xb38): undefined reference toXDisplayHeight’

PVRShellOS.cpp:(.text+0xbd0): undefined reference to XCreatePixmap'<br /> PVRShellOS.cpp:(.text+0xbf5): undefined reference toXCreateGC’

…/Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function PVRShellInitOS::CloseX11Window()':<br /> PVRShellOS.cpp:(.text+0xcc5): undefined reference toXDestroyWindow’

PVRShellOS.cpp:(.text+0xcd6): undefined reference to XFreeColormap'<br /> ../Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In functionPVRShellInit::OsDoReleaseAPI()’:

PVRShellOS.cpp:(.text+0xd2a): undefined reference to XFreePixmap'<br /> PVRShellOS.cpp:(.text+0xd3c): undefined reference toXFreeGC’

…/Linux_x86_32/ReleaseNullWS/PVRShellOS.o: In function PVRShellInit::OsReleaseOS()':<br /> PVRShellOS.cpp:(.text+0x2c): undefined reference toXCloseDisplay’

collect2: ld returned 1 exit status

make: *** […/Linux_x86_32/ReleaseNullWS/OGLESIntroducingPVRShell] Error 1


#2

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


#3

thanks a lot the examples are well running :smiley: