Loading DLLs - statically?

This is a discussion on Loading DLLs - statically? within the C++ Programming forums, part of the General Programming Boards category; Hello! I'm using a DLL in my project (not created by me), and I would like to load it statically, ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    32

    Loading DLLs - statically?

    Hello!

    I'm using a DLL in my project (not created by me), and I would like to load it statically, because I heard somewhere that it is easier to load statically than dynamically? I have the .lib and the DLL, but I don't know how to load them and use the functions contained within. Please can someone help, if they know how this is done.

    Thanks!

    Christopher Howarth

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Basically, you add the .lib to your imported libraries, include the .h, and you're set. You can then use the functions as if they were completely normal functions.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    32
    Basically, you add the .lib to your imported libraries, include the .h, and you're set.
    What do you mean?

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Among the project options, there's a place where you can add .lib files. It goes by different names in different IDEs. By adding the DLL's import library there, the functions become available like other functions - all you then need is their declarations. That's what the library header is for.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Mar 2007
    Posts
    32
    Ah, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cargo loading system
    By kyle rull in forum C Programming
    Replies: 1
    Last Post: 04-20-2009, 12:16 PM
  2. Some doubts on DLLs
    By BrownB in forum Windows Programming
    Replies: 1
    Last Post: 05-30-2007, 02:25 AM
  3. standart dlls
    By keeper in forum C++ Programming
    Replies: 3
    Last Post: 07-05-2006, 07:32 PM
  4. Loading DLLs Into System Processes?
    By DeepBlackMagic in forum Tech Board
    Replies: 4
    Last Post: 12-12-2003, 12:24 PM
  5. Loading Screen
    By pinkcheese in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2002, 10:48 PM

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