I was trying to compile llvm-lua in Ubuntu 10.10 and got these errors:
/home/christophe/Downloads/llvm_lua-1.3.1/llvm-lua/llvm-lua.cpp: In function
‘void print_version()’:
/home/christophe/Downloads/llvm_lua-1.3.1/llvm-lua/llvm-lua.cpp:68: error:
‘printf’ was not declared in this scope
make[2]: *** [build/CMakeFiles/llvm-lua_binary.dir/llvm-lua.o] Error 1
make[1]: *** [build/CMakeFiles/llvm-lua_binary.dir/all] Error 2
make: *** [all] Error 2
(...)
home/christophe/Downloads/llvm_lua-1.3.1/llvm-lua/llvm-luac.cpp: In function
‘void print_version()’:
/home/christophe/Downloads/llvm_lua-1.3.1/llvm-lua/llvm-luac.cpp:95: error:
‘printf’ was not declared in this scope
make[2]: *** [build/CMakeFiles/llvm-luac.dir/llvm-luac.o] Error 1
make[1]: *** [build/CMakeFiles/llvm-luac.dir/all] Error 2
make: *** [all] Error 2
To fix this I added '#include <stdio.h>' at the beginning of llvm-lua.cpp and
llvm-luac.cpp.
Is this the proper way to fix this? Should I pass a configuration to cmake to
avoid these errors?
Kind regards,
Christophe
Original issue reported on code.google.com by christop...@gmail.com on 16 Dec 2010 at 3:54
Original issue reported on code.google.com by
christop...@gmail.com
on 16 Dec 2010 at 3:54