GNU Compiler Collection: Difference between revisions

 
Line 2: Line 2:
==Static Linking==
==Static Linking==
[https://stackoverflow.com/questions/6578484/telling-gcc-directly-to-link-a-library-statically stackoverflow]
[https://stackoverflow.com/questions/6578484/telling-gcc-directly-to-link-a-library-statically stackoverflow]
* Use <code>-static</code>
* Use <code>-static</code> or;
* Use <code>-l:libblah.a</code> instead of <code>-lblah</code>
* Use <code>-l:libblah.a</code> instead of <code>-lblah</code>