How to link .lib library in linux

Posted by giga on Stack Overflow See other posts from Stack Overflow or by giga
Published on 2013-11-06T03:50:52Z Indexed on 2013/11/06 3:53 UTC
Read the original article Hit count: 146

Filed under:

I'm pretty new to c programming and want to port a windows c application to linux. My code uses a .lib file va_g729.lib - is it possible to use the same library in Linux and compile it with gcc?

All my .c and .h files along with the one .lib files are in the same directory. What I'm doing now is executing this command in the directory:

gcc *.c -lm

and I get following errors:

lbcodec2.c:(.text+0xa6b): undefined reference to `va_g729a_init_encoder'
lbcodec2.c:(.text+0xa83): undefined reference to `va_g729a_encoder'
collect2: error: ld returned 1 exit status

Is it possible to link the .lib file and compile with gcc?

Thanks.

© Stack Overflow or respective owner

Related posts about gcc