Thread: Using libraries with c

  1. #1
    Registered User errigour's Avatar
    Join Date
    Mar 2009
    Posts
    102

    Using libraries with c

    Is there a way to just include the library in the c file or a c header file so I don't have to type -lncurses every time I compile my file.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Read your Compiler/Linker documentation and find out the answer.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User errigour's Avatar
    Join Date
    Mar 2009
    Posts
    102
    MAYBE SOMEONE WILL TELL ME i'M USING GCC

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    The only way to do automatic linking is to write a makefile and use that instead.

    But if you're too lazy to type "-lncurses" you're probably too lazy to do that (you do know that pressing the up arrow on your console most likely will go back to the last command so you don't have to type it again, right?).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI Libraries
    By evermore96 in forum Linux Programming
    Replies: 1
    Last Post: 04-30-2005, 11:33 AM
  2. AIM C Libraries
    By _Cl0wn_ in forum C Programming
    Replies: 0
    Last Post: 05-29-2003, 11:06 AM
  3. libraries
    By Klinerr1 in forum C++ Programming
    Replies: 11
    Last Post: 07-30-2002, 04:53 AM
  4. libraries
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 07-26-2002, 02:12 PM
  5. bad libraries or what?
    By Paninaro in forum C Programming
    Replies: 3
    Last Post: 06-20-2002, 07:15 PM