static library

This is a discussion on static library within the C Programming forums, part of the General Programming Boards category; I just had a quick question to confirm. If i had created a static library one that ends with .a ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    static library

    I just had a quick question to confirm. If i had created a static library one that ends with .a then when i load the library in the compiler syntax with -g mylib.a with my main code shouldn't the main code be able to locate the header thats a a header for one of the files in the static library?

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    No, not automatically. You need to pass the location of this header file using the -I option (assuming you are using gcc).
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    192
    okay yea just wanted to make sure i wasn't forgetting something with my bug but i think I have an idea where to look

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [C#] Intercept SysListView32 item added
    By Devils Child in forum Windows Programming
    Replies: 9
    Last Post: 03-26-2010, 07:29 AM
  2. create a static library from C++ and C code
    By lehe in forum C++ Programming
    Replies: 1
    Last Post: 04-06-2009, 07:28 PM
  3. Linking errors with static var
    By Elysia in forum C++ Programming
    Replies: 8
    Last Post: 10-27-2007, 05:24 PM
  4. Replies: 4
    Last Post: 07-06-2006, 02:53 AM
  5. Linker errors with simple static library
    By Dang in forum Windows Programming
    Replies: 5
    Last Post: 09-08-2001, 09:38 AM

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