Current location - Health Preservation Learning Network - Healthy weight loss - How to use dynamic libraries? So files or static libraries. A file in Qt
How to use dynamic libraries? So files or static libraries. A file in Qt
Yes A is a static link library, which is equivalent to a lib file on windows. . The dynamic link library is also equivalent to a dll file on windows. Usage:

1. Copy libstudent.a to the /usr/lib or /lib directory.

2. For example, if your project is test.c, you can compile it like this: gcc -o test test.c libstudent.a or gcc -o test test.c -lstuent.

The use of. So the library is the same.

Supplement:

I told you you were on the windows platform. . Is that cygwin? Copy libstudent.a to the /usr/lib or /lib directory, and copy the dll to the directory where the exe is located.

Yes. Compiling exe requires a file, and. Exe runtime requires dll files.