Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Converting static libraries to dynamic libraries.

Converting static libraries to dynamic libraries.

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Ben Burnett
    wrote on last edited by
    #1

    Hi All: I'm sure there are a number of you who have gone through this experience in the past, and rather than reinvent a method, I thought I'd ask first. Has anyone converted a large number of static libraries to DLLs using an automated method (or semi-automated)? Is there any advice you would give someone trying to do this for the first time? We have about 20 or so to convert, and ideally we would like to find a method that also allows us to use the conversion information to make *nix dynamic objects as well (but it not a hard requirement).

    Regards, -B "[F]reedom isn't a licence, it's responsibility." [David Gerrold, Author's Note in "The Man Who Folded Himself", 2003, p. 119]

    S 1 Reply Last reply
    0
    • B Ben Burnett

      Hi All: I'm sure there are a number of you who have gone through this experience in the past, and rather than reinvent a method, I thought I'd ask first. Has anyone converted a large number of static libraries to DLLs using an automated method (or semi-automated)? Is there any advice you would give someone trying to do this for the first time? We have about 20 or so to convert, and ideally we would like to find a method that also allows us to use the conversion information to make *nix dynamic objects as well (but it not a hard requirement).

      Regards, -B "[F]reedom isn't a licence, it's responsibility." [David Gerrold, Author's Note in "The Man Who Folded Himself", 2003, p. 119]

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Ben Burnett wrote:

      Has anyone converted a large number of static libraries to DLLs

      Yes (well, about 8)

      Ben Burnett wrote:

      using an automated method (or semi-automated)?

      Ummm - I created a new solution, with new DLL projects, copied the code across, hacked it around to add the necessary DLL exporting terms and rebuilt. It pretty much worked, IIRC. Don't forget to use a a DLL based C runtime model across everyhting if you pass around ownership of dynamically allocated objects.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      R 1 Reply Last reply
      0
      • S Stuart Dootson

        Ben Burnett wrote:

        Has anyone converted a large number of static libraries to DLLs

        Yes (well, about 8)

        Ben Burnett wrote:

        using an automated method (or semi-automated)?

        Ummm - I created a new solution, with new DLL projects, copied the code across, hacked it around to add the necessary DLL exporting terms and rebuilt. It pretty much worked, IIRC. Don't forget to use a a DLL based C runtime model across everyhting if you pass around ownership of dynamically allocated objects.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        R Offline
        R Offline
        Rick York
        wrote on last edited by
        #3

        Also, I always use a macro to define the export type of classes and functions so that they can be used in both static and dynamic libraries easily.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups