xboot / libonnx

A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.
MIT License
560 stars 101 forks source link

Can this software run on MacOS #7

Closed feifeibear closed 3 years ago

feifeibear commented 3 years ago

I came across an error when compling it on my Mac.

[CC] helper.c In file included from helper.c:28: ./helper.h:13:10: fatal error: 'malloc.h' file not found

include

     ^~~~~~~~~~

1 error generated. make[1]: [helper.o] Error 1 make: [all] Error 2

jianjunjiang commented 3 years ago

macos don‘t have malloc.h ? this is c startard library.

feifeibear commented 3 years ago

https://stackoverflow.com/questions/56463049/should-mac-osx-have-a-malloc-h-file

According to this post, it is not a standard one any more.

jianjunjiang commented 3 years ago

just remove malloc.h, and compile it will be ok. if memalign fail, using malloc instead