#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    6
    Rep Power
    0

    Question Linking static libraries


    Compiler: MS VC++ 6.0

    Iím trying to write a static library to use in future projects. Iíve already made one that uses MFC, which is easy because the VC++ wizard sets it up for you. I now have a couple of third party libraries which I would like to use in the new library that Iím making. I wondering if anyone could tell me how I might go about linking the third party libraries to the one Iím creating. When you make a regular project there is a ďLinkĒ tab in the settings dialog where you can specify what you link to. But when you create a static library the ďLinkĒ tab is no longer present. Arenít I supposed to link to the other libraries, or do I do something else?

    And if anyone could recommend a book on how to actually use this compiler I would really appreciate it, (i.e. settings, linking, preprocessor settings, what the hundreds of settings actually do, the proper way to link files, etc. etc. etc.)

    Thanks for your time.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    I'm not certain about MSVC++, but at least on UNIX platforms a static library can't be linked to other libraries. The library format there is really just a collection of object files with an index into the functions those files contain.

    I don't know what the format of a static windows library is, but I suspect that it's similar. You might try creating a dynamic library, which does allow linking.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/

IMN logo majestic logo threadwatch logo seochat tools logo