[SDL] Fail to build SDL-2.0.5, after enabling -std=c99 ...

JIA Pei jp4work at gmail.com
Fri Mar 3 14:11:14 PST 2017

Hi, all:

Working Environment: Ubuntu 16.04.2
GCC Version: 5.4.0

I successfully configured SDL-2.0.5 for further building. And I configured
"-std=c99" for CMAKE_C_FLAGS, see the following:

> CMAKE_C_FLAGS                    -std=c99

However, I get ERROR messages for the assembly code in file SDL_cpuinfo.c

> SDL2-2.0.5/src/cpuinfo/SDL_cpuinfo.c:250:34: error: expected ‘)’ before ‘:’
> token
>     asm(".byte 0x0f, 0x01, 0xd0" : "=a" (a) : "c" (0) : "%edx");

I'm pretty sure this ERROR message has something to do with -std=c99 . I
wonder which version of C is SDL2-2.0.5 compatible with?



Pei JIA, Ph.D.

Email: jp4work at gmail.com
cell in Canada:    +1 778-863-5816
cell in China: +86 186-8244-3503

Welcome to Vision Open
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20170303/306ee16e/attachment.htm>

More information about the SDL mailing list