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. Convert .exe to .dll

Convert .exe to .dll

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionhelptutoriallearning
3 Posts 3 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.
  • J Offline
    J Offline
    jw81
    wrote on last edited by
    #1

    How to convert an .exe to .dll? I tried to add project>files to add .cpp and .h files. But when I compile it, I got an error "fatal error C1189: #error : include 'stdafx.h' before including this file for PCH" Sorry if my question is too newbie, I cant find any solution in my VC++ reference book. Thanks.

    S M 2 Replies Last reply
    0
    • J jw81

      How to convert an .exe to .dll? I tried to add project>files to add .cpp and .h files. But when I compile it, I got an error "fatal error C1189: #error : include 'stdafx.h' before including this file for PCH" Sorry if my question is too newbie, I cant find any solution in my VC++ reference book. Thanks.

      S Offline
      S Offline
      shaileshkumar
      wrote on last edited by
      #2

      First you should make a project, which would make dlls, this option you would have to select, while making the project itself. And when you write the .cpp files, the first #include should be #include stdafx.h, to avoid PCH (pre compiled headers) problems, then on you can include other header files. And you would have to add some keywords with the functions you are exposing in the dll. For this, refer to some dll examples. - Shailesh

      1 Reply Last reply
      0
      • J jw81

        How to convert an .exe to .dll? I tried to add project>files to add .cpp and .h files. But when I compile it, I got an error "fatal error C1189: #error : include 'stdafx.h' before including this file for PCH" Sorry if my question is too newbie, I cant find any solution in my VC++ reference book. Thanks.

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        See question 2.5[^] in the FAQ. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ----

        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