Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a program that includes <stdlib.h> ,<string.h> and i want to statically link to the libc that contains these libraries , rather than do it dynamically !!
so , first is it possible ?
if it's yes ! could you give me the syntax please !
thanks in advance.

What I have tried:

gcc <objectfiles> -static -lstatic1 -lstatic2
i found this one while looking on google , but i didn't understand it !
Posted
Updated 29-Apr-18 22:20pm

1 solution

See Using the GNU Compiler Collection (GCC): Link Options[^]. You need the -static-libgcc and -static-libstdc++ options to include the static libraries.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900