[CMake] conflicting types for built-in function 'snprintf'

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jul 8 17:22:29 EDT 2009


On Wednesday 08 July 2009, Steven Van Ingelgem wrote:
> Hi,
>
>
> I tried this call:
> CHECK_FUNCTION_EXISTS(snprintf  HAS_snprintf)
>
>
> Which results in this error being generated:
> C:\MinGW\bin\gcc.exe   -g -ggdb -O0 -Wall -Werror
> -DCHECK_FUNCTION_EXISTS=snprintf   -o
> CMakeFiles\cmTryCompileExec.dir\CheckFunctionExists.c.obj   -c "C:\Program
> Files\CMake 2.7\share\cmake-2.7\Modules\CheckFunctionExists.c"
> cc1.exe: warnings being treated as errors
> C:\Program Files\CMake 2.7\share\cmake-2.7\Modules\CheckFunctionExists.c:3:
> error: conflicting types for built-in function 'snprintf'

Did you try using check_symbol_exists() ?

Alex


More information about the CMake mailing list