Thread: Using a DLL without .a file

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    3

    Using a DLL without .a file

    I have create a DLL with a class in it with DevCpp.

    But my project create also a .a file i have to link in the project of the program which use the DLL.

    I want to create a libaray which can be use with all c++ compileur (DevCpp, MS Visual c++ and free Borland c++).

    Is it possible to create and use a DLL without having to link a .a (or.lib) file?
    And how?
    Do you have a very simple example source code (because i am a beginner)?

    Thanks.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Look up LoadLibrary( ) on MSDN.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644

    Re: Using a DLL without .a file

    Originally posted by greg2
    I have create a DLL with a class in it with DevCpp.

    But my project create also a .a file i have to link in the project of the program which use the DLL.

    I want to create a libaray which can be use with all c++ compileur (DevCpp, MS Visual c++ and free Borland c++).

    Is it possible to create and use a DLL without having to link a .a (or.lib) file?
    And how?
    Do you have a very simple example source code (because i am a beginner)?

    Thanks.
    Here's some sample code using LoadLibrary() that XSquared said:
    PHP Code:
    HANDLE hDLL;

    hDLL LoadLibrary("file.dll"); 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File Writing Problem
    By polskash in forum C Programming
    Replies: 3
    Last Post: 02-13-2009, 10:47 AM
  2. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  3. Replies: 4
    Last Post: 07-06-2006, 02:53 AM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM