abduld / llvm-lua

Automatically exported from code.google.com/p/llvm-lua
Other
0 stars 0 forks source link

llvm-lua compilation in Ubuntu #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
yes, that is the correct fix.  I have committed those changes.

Original comment by rjakabo...@gmail.com on 9 Jan 2011 at 3:37