How to link .lib library in linux
- by giga
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.