compile error


(szarik) #1

Compile RTCW source (ftp://ftp.idsoftware.com/idstuff/source/RTCW-SP-GPL.zip).

Error:


release-x86-Linux-2.1/full/unix/linux_glimp.c: In function 'GLW_InitGamma':
release-x86-Linux-2.1/full/unix/linux_glimp.c:1251: error: 'vidmode_InitialGamma' undeclared (first use in this function)
cons: *** [release-x86-Linux-2.1/full/unix/linux_glimp.o] Error 1
cons: errors constructing release-x86-Linux-2.1/full/unix/linux_glimp.o

line 1251 file:

XF86VidModeGetGamma( dpy, scrnum, &vidmode_InitialGamma );

more


static void GLW_InitGamma() {
	/* Minimum extension version required */
  #define GAMMA_MINMAJOR 2
  #define GAMMA_MINMINOR 0

	glConfig.deviceSupportsGamma = qfalse;

	if ( vidmode_ext ) {
		if ( vidmode_MajorVersion < GAMMA_MINMAJOR ||
			 ( vidmode_MajorVersion == GAMMA_MINMAJOR && vidmode_MinorVersion < GAMMA_MINMINOR ) ) {
			ri.Printf( PRINT_ALL, "XF86 Gamma extension not supported in this version
" );
			return;
		}
		XF86VidModeGetGamma( dpy, scrnum, &vidmode_InitialGamma );
		ri.Printf( PRINT_ALL, "XF86 Gamma extension initialized
" );
		glConfig.deviceSupportsGamma = qtrue;
	}
}

What may be the result? Linux ubuntu 10.04, acceleration is working.


(valkyr) #2

You’re probably missing an X11 header file.

Look at the lines before the error (it could be 50-100 lines back) and you’ll probably see something like :

cannot find ???.h

Do an “apt-file search” on the “???.h” file to find which Ubuntu package it’s in, and then “apt-get install” that package.

It could be “libxxf86vm-dev” you need.