Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22122

If GCC only finds a static library and not a dynamic one, does it resort to static linking the found file?

$
0
0

Please consider the following command:

gcc myfile.c -o myapp.exe -Lmydir -lmylib

mydir inclues the following file:

`libmylib.a`

I know that by default, gcc wants to do dyanmic linking. However, as you can see it does not find a libmylib.so dynamic library, only a libmylib.astatic one.

Does that mean that gcc will statically linklibmylib.a into the result executable?


Viewing all articles
Browse latest Browse all 22122

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>