Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
While compiling the code in unix,my friend suggested that try the following command i.e the command is
1.gcc test.c -l sqlite3 -o tt
2.# gcc Sqlite_test.c -l sqlite3 -o tt

in both the command -l is used and what is this used for moreover what is the reason of using # in front of gcc.
Posted
Comments
Richard MacCutchan 14-Oct-14 6:13am    
Type "gcc -?" and it will give you all the information tyou are looking for.

Quote:
in both the command -l is used and what is this used for
The documentation helps: "GCC, Options for Linking"[^].



Quote:
what is the reason of using # in front of gcc.
The '#' character starts a comment line for the shell, hence
# gcc Sqlite_test.c -l sqlite3 -o tt
does nothing.
 
Share this answer
 
Comments
Maciej Los 14-Oct-14 7:15am    
5ed!
CPallini 14-Oct-14 7:58am    
Thank you!
iirc the '-l' option says 'link against this (library)' or 'search this library for linkable references'
 
Share this answer
 
v2

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