Hi.
I'm planning to use tinyCC as a JIT compiler. For that, I link against
"libtcc.a" and include "libtcc.h".
Apparently, tinyCC also needs to link "libtcc1.a" before running code,
which is no suprise as it contains tinyCC's C runtime.
Then, there is another file called "tcclib.h", which actually isn't used
by tinyCC at all, and is, according to the comments, just a dumping
ground for various libc declarations.
This naming scheme is somewhat confusing. My suggestion would be to
1. rename "libtcc1.a" to something like "libtccrt.a"
2. rename "tcclib.h" to "tcclibc.h" (or any other name that doesn't
suggests a close relationship to libtcc)
The example code in "tests/libtcc_test.c" also claim that
`tcc_set_lib_path()` should be called to tell tinyCC where "tcclib.h"
(why?) and "libtcc1.a" are located.
However, everything seems to work if you do not call
`tcc_set_lib_path()` and just move "libtcc1.a" into a library directory
(ie a directory added via `tcc_add_library_path()`).
It seems that `tcc_set_lib_path()` serves no useful purpose and could be
removed during a round of API cleanup.
Christoph
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel