Subj : tcc - how do I specify the library paths ? To : alt.comp.linux,alt.comp.os.linux,comp.os.linux From : markhobley Date : Sun Oct 31 2004 03:06 am I am using Debian, and I have installed the package "argtable" from source. I have the following files on my system: /usr/local/lib/libargtable2.a /usr/local/lib/libargtable2.so /usr/local/lib/libargtable2.so.3 I have downloaded the example file mv.c, from the argtable website at: http://argtable.sourceforge.net/ On compilation, I get errors as follows: $ cc mv.c tcc: undefined symbol 'arg_str0' tcc: undefined symbol 'arg_lit0' tcc: undefined symbol 'arg_rem' tcc: undefined symbol 'arg_filen' tcc: undefined symbol 'arg_end' tcc: undefined symbol 'arg_nullcheck' tcc: undefined symbol 'arg_parse' tcc: undefined symbol 'arg_print_syntax' tcc: undefined symbol 'arg_print_glossary' tcc: undefined symbol 'arg_print_errors' tcc: undefined symbol 'arg_freetable' I can produce an object file, as follows: $ cc -c mv.c This works ok and produces mv.o. (I don't know how to link this) $ gcc mv.c This errors as follows (some output has been lost off the top of the screen): /tmp/ccSgX617.o(.text+0x393): In function `main': : undefined reference to `arg_lit0' /tmp/ccSgX617.o(.text+0x3b2): In function `main': : undefined reference to `arg_lit0' /tmp/ccSgX617.o(.text+0x3eb): In function `main': : undefined reference to `arg_filen' /tmp/ccSgX617.o(.text+0x402): In function `main': : undefined reference to `arg_rem' /tmp/ccSgX617.o(.text+0x411): In function `main': : undefined reference to `arg_end' /tmp/ccSgX617.o(.text+0x4ce): In function `main': : undefined reference to `arg_nullcheck' /tmp/ccSgX617.o(.text+0x540): In function `main': : undefined reference to `arg_parse' /tmp/ccSgX617.o(.text+0x581): In function `main': : undefined reference to `arg_print_syntax' /tmp/ccSgX617.o(.text+0x5ac): In function `main': : undefined reference to `arg_print_glossary' /tmp/ccSgX617.o(.text+0x622): In function `main': : undefined reference to `arg_print_errors' /tmp/ccSgX617.o(.text+0x6e4): In function `main': : undefined reference to `arg_freetable' collect2: ld returned 1 exit status I think maybe some environment variables need setting, or a config file needs changing for the libraries to be located. Thanks in advance to anyone who can help. Regards, Mark. -- Mark Hobley 393 Quinton Road West QUINTON Birmingham B32 1QE Reply to: markhobley at hotpop dot do_not_type_this_bit com http://markhobley.yi.org/ .