jakogut/tinyvm

build error~

wenerme opened this issue · 1 comments

# make rebuild DEBUG=yes  PROFILE=yes
gcc -Wall -pipe -Iinclude/ -std=c99 -g -Werror -pedantic -pedantic-errors -O3 -c
 libtvm/tvm.c -o libtvm/tvm.o
In file included from libtvm/tvm.c:1:0:
include/tvm/tvm.h:63:24: error: 'printf' is static but used in inline function '
tvm_step' which is not static
make: *** [libtvm/tvm.o] Error 1

i delete the inline attribute,but it still not work,said

lib//libtvm.a(tvm.o): In function `tvm_step':
G:\minienv2\env\mingw\msys\1.0\home\Wener\gits\tinyvm/include/tvm/tvm.h:26: mult
iple definition of `tvm_step'
C:\Users\Wener\AppData\Local\Temp\ccbvfXLm.o:G:\minienv2\env\mingw\msys\1.0\home
\Wener\gits\tinyvm/include/tvm/tvm.h:26: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [tvmi] Error 1

Builds just fine for me with GCC 4.7.2. No errors, no warnings. Looks like you're building on Windows with MinGW. That's not officially supported yet. You can remove the inline specifier, then move the definition of tvm_step() to tvm.c, and that should fix your build error. Alternatively, you can try and see if MSVC will compile it as is.