how to create an Import Library in Vs2008

This is a discussion on how to create an Import Library in Vs2008 within the C++ Programming forums, part of the General Programming Boards category; a requirement was sent to me below: API should be in the form of static library. company xxx will link ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    5

    how to create an Import Library in Vs2008

    a requirement was sent to me below:

    API should be in the form of static library. company xxx will link the library into a third party application to prevent any possible exposure of the code(dll)

    could they mean an import library? An import library is a library that automates the process of loading and using a dynamic library. On Windows, this is typically done via a small static library (.lib) of the same name as the dynamic library (.dll). The static library is linked into the program at compile time, and then the functionality of the dynamic library can effectively be used as if it were a static library.

    this might be what they might be eluding to.....I am not sure how to make this in vs2008 .

    Additional facts: I have a static lib that i use in my current application. Now, I have to convert my app that uses that static lib into an import lib so that they can use a third party prog to access the API's they providede me which in turn will use that static lib i am using.

    I hope I am clearly explaining this. I am just not sure how to go about it in vs2008. I am looking for specific steps to do this. I already have the coding done. Just need to convert it into the form they are asking and I have to provide the API they want. Other than that then I need to create a test prog which will act as that third party prog so I can make sure my import library works.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I don't think they want "a small static library of the same name as the dynamic library" -- I think they really just want a static library. So don't make a .dll, make a .lib instead. (If that's not one of your project type choices, you can change the linking under project properties.)

    I don't see how interfacing with another static library will be a problem -- your .lib won't include any of the code from that other .lib; they'll just be linked together in the final executable as normal.

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    5
    well I will be getting more information from these people about what they really want....and update you on it.

    When I made my project in vs2008 as a static lib and then i tried to include this other lib inside of it i was getting the following warnings..

    LNK4221: no public symbols found; archive member will be inaccessible.
    followed by

    LNK4006......second definition ignored.

    I don't want them to know I am using another static lib or what that lib is which is why i want to put it as part of my static lib that I will give them. However, as you can see those warnings I am getting just means that maybe I have to use the lib.exe and manually extract the obj files I am referencing and include that as part of my lib as a way to remove those warning...I am just theorizing here don't really know how to do it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 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
  2. How to create IAR library
    By nenpa8lo in forum C Programming
    Replies: 1
    Last Post: 02-27-2009, 06:05 AM
  3. dllimport
    By George2 in forum C++ Programming
    Replies: 15
    Last Post: 02-23-2008, 03:35 AM
  4. Create a user library
    By mabuhay in forum C Programming
    Replies: 8
    Last Post: 11-03-2005, 02:42 PM
  5. Cannot create MDI Client Win
    By JaWiB in forum Windows Programming
    Replies: 1
    Last Post: 10-31-2005, 09:05 PM

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