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. How do I import a class into a dll?

How do I import a class into a dll?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
4 Posts 2 Posters 0 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.
  • K Offline
    K Offline
    Keylee717
    wrote on last edited by
    #1

    Hi, I need to use a class that is outside of my DLL in my DLL. I've tried every way I know of, but I can't seem to accomplish it. I know you can export from a DLL, but can you import into a DLL? :~ The outside class is not in another DLL, it's free-standing in the project. I'm not very experienced with DLLs, so any help is greatly appreciated...Thanks!

    B 1 Reply Last reply
    0
    • K Keylee717

      Hi, I need to use a class that is outside of my DLL in my DLL. I've tried every way I know of, but I can't seem to accomplish it. I know you can export from a DLL, but can you import into a DLL? :~ The outside class is not in another DLL, it's free-standing in the project. I'm not very experienced with DLLs, so any help is greatly appreciated...Thanks!

      B Offline
      B Offline
      bikram singh
      wrote on last edited by
      #2

      Keylee717 wrote: it's free-standing in the project If this means the class is in source-form, then just copy it over! If it means it's part of an EXE, then Im afraid there is no easy way (if any) to import! Bikram Singh

      K 1 Reply Last reply
      0
      • B bikram singh

        Keylee717 wrote: it's free-standing in the project If this means the class is in source-form, then just copy it over! If it means it's part of an EXE, then Im afraid there is no easy way (if any) to import! Bikram Singh

        K Offline
        K Offline
        Keylee717
        wrote on last edited by
        #3

        Hi Bikram I would copy it over, but that class relies on other classes in the project. I can do it as a last resort and just copy all of the classes needed into the dll, but if I do that I may as well not use a dll and just put it all into the client project. Thanks for your help!

        B 1 Reply Last reply
        0
        • K Keylee717

          Hi Bikram I would copy it over, but that class relies on other classes in the project. I can do it as a last resort and just copy all of the classes needed into the dll, but if I do that I may as well not use a dll and just put it all into the client project. Thanks for your help!

          B Offline
          B Offline
          bikram singh
          wrote on last edited by
          #4

          Well, you needent really make a copy of the class and the classes it depends on... Just add the class and the related classes to the VC++ file view.. Keylee717 wrote: I can do it as a last resort and just copy all of the classes needed into the dll, but if I do that I may as well not use a dll and just put it all into the client project So why not use a DLL? It's always better to do that, so that in future you have only one copy of the classes to maintain. With multiple copies, you, for example, fix a bug and you've got to fix the bug in all copies... Bikram Singh

          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