testver.c
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- /* Test program to compare the compile-time version of SDL with the linked
- version of SDL
- */
- #include <stdio.h>
- #include "SDL.h"
- #include "SDL_byteorder.h"
- int main(int argc, char *argv[])
- {
- SDL_version compiled;
- /* Initialize SDL */
- if ( SDL_Init(0) < 0 ) {
- fprintf(stderr, "Couldn't initialize SDL: %sn",SDL_GetError());
- exit(1);
- }
- #ifdef DEBUG
- fprintf(stderr, "SDL initializedn");
- #endif
- #if SDL_VERSION_ATLEAST(1, 2, 0)
- printf("Compiled with SDL 1.2 or newern");
- #else
- printf("Compiled with SDL older than 1.2n");
- #endif
- SDL_VERSION(&compiled);
- printf("Compiled version: %d.%d.%dn",
- compiled.major, compiled.minor, compiled.patch);
- printf("Linked version: %d.%d.%dn",
- SDL_Linked_Version()->major,
- SDL_Linked_Version()->minor,
- SDL_Linked_Version()->patch);
- printf("This is a %s endian machine.n",
- (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big");
- SDL_Quit();
- return(0);
- }