More of a GCC question

This is a discussion on More of a GCC question within the C Programming forums, part of the General Programming Boards category; So I have a library (libtiff) and its associated header "tiffio.h." But I'm not entirely sure how to make the ...

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    18

    More of a GCC question

    So I have a library (libtiff) and its associated header "tiffio.h." But I'm not entirely sure how to make the compiler (I'm using gcc under mingw) "see" the library and the header. Do I need to put the library and header somewhere specific, or somehow specify something with the options. Thanks for your help

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    You can either put them in the appropriate folders (usually in the compiler's 'libraries' and 'includes' folders) or set your compiler to look into other folders (I don't know if it's possible with GCC).

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    37
    are you using linux or windows.. ?
    If you are using something like Dev-c++. It does have a folder called "include" ( check where you have installed it) and you can place it there..

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    > or somehow specify something with the options
    Yes, use these options
    Code:
    -I/path/to/header (that's upper case i) 
    -L/path/to/lib
    -llibname.a (that's lower case L)
    Exactly how you specify these if you're using an IDE interface to the compiler would depend on that particular IDE.

    With these options, you can put 3rd party libraries wherever you like, and you don't have to touch the compiler installation directories (which is generally a bad idea).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Jun 2006
    Posts
    18
    Thanks for your help everyone!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. question - linux - gcc - c standards
    By AMAMH in forum C Programming
    Replies: 12
    Last Post: 12-03-2009, 02:49 AM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  3. Gcc can't find obvious copy constructor
    By SevenThunders in forum C++ Programming
    Replies: 13
    Last Post: 03-19-2009, 03:41 PM
  4. Quick Compilation Question
    By chacham15 in forum C Programming
    Replies: 10
    Last Post: 10-12-2008, 09:15 PM
  5. Question about linux compiling with GCC
    By elsheepo in forum C++ Programming
    Replies: 23
    Last Post: 03-07-2008, 11:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21