Skip to main content

Timeline for answer to How to include header files in GCC search path? by Tim Gilbert

Current License: CC BY-SA 4.0

Post Revisions

12 events
when toggle format what by license comment
Jul 5, 2023 at 2:11 review Suggested edits
Jul 5, 2023 at 13:13
S Nov 20, 2020 at 10:10 history suggested Alberto Chiusole CC BY-SA 4.0
dead link removed
Nov 20, 2020 at 0:06 review Suggested edits
S Nov 20, 2020 at 10:10
Mar 31, 2020 at 11:58 comment added Aviv Cohn @EdwinPratt Perhaps you meant to say that -L tells GCC where to look for binary libraries to include (which are specified with -l). And -I tells GCC where to look for header files to include.
Jan 21, 2019 at 10:39 comment added Ed The ''Pro'' @falsePockets The -L flag tells GCC to include a library. For example, gcc -c -c a.c will include libmath. The -I flags tells GCC to include files from a different directory.
Oct 15, 2018 at 0:31 comment added falsePockets What's the difference between -I and -L?
Sep 25, 2017 at 14:38 comment added Robert Schwarz According to this answer to a similar question, gcc would not search the subdirectories for the different header files automatically. Instead, pkg-config could produce the proper -I option?
Dec 8, 2013 at 16:46 comment added CodyBugstein If the header is in the same directory as the source, do you need a special include? I can't get my code to compile either way, and I'm not sure what the problem is
Sep 6, 2011 at 6:20 comment added Nav Glad to see this answer here. Another point worth mentioning would be that when you have many ".c" source files, it's necessary to specify each and every one of them in the commandline itself. You can't just do something like a -I to specify that all source files are in a certain directory.
Jun 17, 2009 at 18:18 vote accept Mark
Jun 17, 2009 at 18:18 vote accept Mark
Jun 17, 2009 at 18:18
Jun 10, 2009 at 0:25 history answered Tim Gilbert CC BY-SA 2.5