Вопрос

I'm trying TCC under OS X. I had to make some modifications following this answer to make it compile.

Trying to run the ex1.c included with the source I get:

In file included from ./ex1.c:3:
In file included from /usr/local/lib/tcc/include/tcclib.h:11:
In file included from /usr/local/lib/tcc/include/stdarg.h:5:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:117:
/usr/include/sys/resource.h:249: ';' expected

In that resource.h file line there is:

int getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit);

So I guessed it is something with that __DARWIN_ALIAS, but a simple #define before including tcclib.h in the ex1.c file is not working. Any workaround?

Это было полезно?

Решение

It is a bit late, but I hope it is better now then never.

I have spent some time on the OSX issues, and tcc should now compile and run several tests and examples on OSX. Most things not working are Linux specific like ex4.c which uses X11.

I invite you to get the latest of tcc from its git repository. Make sure to get the 'mob' branch rather then 'master'. Please see http://repo.or.cz/w/tinycc.git for details, and do join the mailing list to get involved.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top