TCC issue: libtcc1.a not found

1.1k views Asked by At

I am trying to have some fun with TCC, but there seams to be a problem:

magniff@/home/magniff/Downloads/tcc-0.9.26> ./tcc examples/ex1.c -Iinclude -Llib
tcc: error: file '/usr/local/lib/tcc/libtcc1.a' not found

but

magniff@/home/magniff/Downloads/tcc-0.9.26> ls lib -l
-rw-r--r--. 1 magniff magniff   15492 Mar 17 19:12 libtcc1.a  <-- this guy
-rw-r--r--. 1 magniff magniff 1411822 Mar 17 19:12 libtcc.a

Symlink is not an option either. It seams to be a common TCC issue, but solution always looks like some custom hack. Any ideas?

I am using fedora 20

2

There are 2 answers

0
Jeffrey Bosboom On

It seems that TCC is not able to use symlinks, so you need to actually copy the lib.

(originally posted by the asker as a comment)

0
Jeff Hykin On

To run tcc without installing do:

./tcc -L./ ./hello_world.c

By default the libtcc1.a is dumped into the project directory so -L./ just uses the current folder for finding linked libraries.