Libraries... another question from me...

This is a discussion on Libraries... another question from me... within the C++ Programming forums, part of the General Programming Boards category; I'm making my own library, I wanted it to be just like the run-time libraries, where you include a header ...

  1. #1
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    Libraries... another question from me...

    I'm making my own library, I wanted it to be just like the run-time libraries, where you include a header file, which has class declarations, function prototypes, enumerated types, etc... but no actual code, because it was linked to a precompiled library. My compiler gives my three choices. Static for DLLs, Static for EXEs, and Import libraries. I think import is the one to go with. In my actual code to be put in the library, I have evrything needed for a program to run properly, except a main funtion (I mean verything has been fully defined). So once I have this library, how do I 'link' it to my header file, and what needs to go into my header file?
    Thanks if you can help,
    Sean Mackrory
    sean_mackrory@hotmail.com

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    156
    An import library is used with a .dll.

    An import library is more like a proxy that you use to resolve the link for your function. The import library contains no code. Instead, they provide the linker with information neccessary to set up reloaction tables within the .exe file for dynamic linking. This information goes into the .exe file so that Windows can perform dynamic linking with the .dll.

    All functions you wish to use in the dll from your .exe must be exported. It must have a DllMain entery point just like an .exe has to have a main or winmain depending on wheter its a console or a windows app.

    I'm sure you can find more information on msdn.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Building with libraries
    By Opel_Corsa in forum C++ Programming
    Replies: 5
    Last Post: 01-22-2007, 10:50 PM
  2. Question: .swf libraries?
    By spanz in forum C Programming
    Replies: 3
    Last Post: 12-09-2006, 01:13 PM
  3. Question about allegro and other graphics libraries....
    By o0obruceleeo0o in forum Game Programming
    Replies: 2
    Last Post: 06-12-2003, 12:02 AM
  4. Self regiserting DLLs question and libraries question.
    By ApocalypticTime in forum Windows Programming
    Replies: 2
    Last Post: 03-22-2003, 02:02 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM

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