Static library not included in resulting LLVM executable

Posted by Matthew Glubb on Stack Overflow See other posts from Stack Overflow or by Matthew Glubb
Published on 2010-04-06T09:37:34Z Indexed on 2010/04/06 9:43 UTC
Read the original article Hit count: 283

Filed under:
|
|

Hi,

I am trying to compile a c program using LLVM and I am having trouble getting some static libraries included. I have successfully compiled those static libraries using LLVM and, for example, libogg.a is present, as is ogg.l.bc.

However, when I try to build the final program, it does not include the static ogg library. I've tried various compiler options with the most notable being:

gcc oggvorbis.c -O3 -Wall -I$OV_DIR/include -l$OV_DIR/lib/libogg.a -l$OV_DIR/lib/libvorbis.a -o test.exe

This results in the following output (directories shortened for brevity):

$OV_DIR/include/vorbis/vorbisfile.h:75: warning: ‘OV_CALLBACKS_DEFAULT’ defined but not used
$OV_DIR/include/vorbis/vorbisfile.h:82: warning: ‘OV_CALLBACKS_NOCLOSE’ defined but not used
$OV_DIR/include/vorbis/vorbisfile.h:89: warning: ‘OV_CALLBACKS_STREAMONLY’ defined but not used
$OV_DIR/include/vorbis/vorbisfile.h:96: warning: ‘OV_CALLBACKS_STREAMONLY_NOCLOSE’ defined but not used
llvm-ld: warning: Cannot find library '$OV_DIR/lib/ogg.l.bc'
llvm-ld: warning: Cannot find library '$OV_DIR/lib/vorbis.l.bc'
WARNING: While resolving call to function 'main' arguments were dropped!

I find this perplexing because $OV_DIR/lib/ogg.l.bc DOES exit, as does vorbis.l.bc and they are both readable (as are their containing directories) by everyone.

Does anyone have any idea with what I am doing wrong?

Thanks,

Matt

© Stack Overflow or respective owner

Related posts about c

    Related posts about llvm