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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. needed dll's on other computers

needed dll's on other computers

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsgame-devjsonquestion
5 Posts 4 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.
  • G Offline
    G Offline
    Grimes
    wrote on last edited by
    #1

    hi i'm currently making a small game,using SDL libraries for graphics(i know its old but its easy), but if i compile the program, with VC6 , and try to run it on other machines it needs some dll's. ("sdl.dll" "msvcp60.dll" "MSVCP60D.dll" ...) the list goes on, i understand why it would need the SDL.dll but the rest... is there a way to compile it so it wouldn't need anyother files except the exe? -- modified at 8:53 Monday 15th May, 2006

    C E D 3 Replies Last reply
    0
    • G Grimes

      hi i'm currently making a small game,using SDL libraries for graphics(i know its old but its easy), but if i compile the program, with VC6 , and try to run it on other machines it needs some dll's. ("sdl.dll" "msvcp60.dll" "MSVCP60D.dll" ...) the list goes on, i understand why it would need the SDL.dll but the rest... is there a way to compile it so it wouldn't need anyother files except the exe? -- modified at 8:53 Monday 15th May, 2006

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      These dll's are needed (they contain for example the C run-time library, ...). In order to see which dll's are required for your executable, you can use the Dependency Walker[^] (it's also supplied with VC6, look for depends.exe).


      Cédric Moonen Software developer
      Charting control

      1 Reply Last reply
      0
      • G Grimes

        hi i'm currently making a small game,using SDL libraries for graphics(i know its old but its easy), but if i compile the program, with VC6 , and try to run it on other machines it needs some dll's. ("sdl.dll" "msvcp60.dll" "MSVCP60D.dll" ...) the list goes on, i understand why it would need the SDL.dll but the rest... is there a way to compile it so it wouldn't need anyother files except the exe? -- modified at 8:53 Monday 15th May, 2006

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        And you try using the dependency walker after you move your application to Release mode. It'd further reduce the dependencies. for example those ending with "D" like MSVCP60D.dll .


        --[V]--

        [My Current Status]

        1 Reply Last reply
        0
        • G Grimes

          hi i'm currently making a small game,using SDL libraries for graphics(i know its old but its easy), but if i compile the program, with VC6 , and try to run it on other machines it needs some dll's. ("sdl.dll" "msvcp60.dll" "MSVCP60D.dll" ...) the list goes on, i understand why it would need the SDL.dll but the rest... is there a way to compile it so it wouldn't need anyother files except the exe? -- modified at 8:53 Monday 15th May, 2006

          D Offline
          D Offline
          Dy
          wrote on last edited by
          #4

          Grimes wrote:

          "msvcp60.dll" "MSVCP60D.dll"

          As others have said, this is part of the c runtime, you need them.

          Grimes wrote:

          is there a way to compile it so it wouldn't need anyother files except the exe?

          Yes, this is called 'statically linking'. What you're doing now is 'dynamically linking', that's why you need these Dynamic Link Libraries (.dll's). When you statically link, you're basically inserting the contents of the library into your .exe file. Your file will be bigger, but it won't need the DLL's. To statically link to the CRT in VC6:

          1. Select Project, Settings (or press Alt+F7)
          2. Select the C++ tab
          3. In the 'category' combo, select 'Code generation'
          4. In the 'use run-time library' combo, select any of the items that don't end with DLL.
          5. Say okay, save and build.

          If you look at the exe file produced in depends.exe you will notice that the CRT libraries are not required. You will still see other dependencies, like kernal32.dll etc. - these are part of the Windows OS - they will be on your target machine. Which run time option should you select from that last combo? For debug builds, select 'Debug multithreaded', for release builds select 'Multithreaded'. I suggest this as your working on a game - so I'm guessing your using threads. Are you using MFC? If you are, then you must statically link to MFC if your going to statically link to the C runtime. To do this, bring up the Project settings dialog again, and on the general tab, select 'Use MFC in a static library' from the MFC combo. Hope this helps. BTW: I'd recommend dynamic linking, it means you don't need to do any of the above - just distribute the required libraries with your EXE.


          - Dy

          G 1 Reply Last reply
          0
          • D Dy

            Grimes wrote:

            "msvcp60.dll" "MSVCP60D.dll"

            As others have said, this is part of the c runtime, you need them.

            Grimes wrote:

            is there a way to compile it so it wouldn't need anyother files except the exe?

            Yes, this is called 'statically linking'. What you're doing now is 'dynamically linking', that's why you need these Dynamic Link Libraries (.dll's). When you statically link, you're basically inserting the contents of the library into your .exe file. Your file will be bigger, but it won't need the DLL's. To statically link to the CRT in VC6:

            1. Select Project, Settings (or press Alt+F7)
            2. Select the C++ tab
            3. In the 'category' combo, select 'Code generation'
            4. In the 'use run-time library' combo, select any of the items that don't end with DLL.
            5. Say okay, save and build.

            If you look at the exe file produced in depends.exe you will notice that the CRT libraries are not required. You will still see other dependencies, like kernal32.dll etc. - these are part of the Windows OS - they will be on your target machine. Which run time option should you select from that last combo? For debug builds, select 'Debug multithreaded', for release builds select 'Multithreaded'. I suggest this as your working on a game - so I'm guessing your using threads. Are you using MFC? If you are, then you must statically link to MFC if your going to statically link to the C runtime. To do this, bring up the Project settings dialog again, and on the general tab, select 'Use MFC in a static library' from the MFC combo. Hope this helps. BTW: I'd recommend dynamic linking, it means you don't need to do any of the above - just distribute the required libraries with your EXE.


            - Dy

            G Offline
            G Offline
            Grimes
            wrote on last edited by
            #5

            Thanx you guys really helped alot, it seems to be working great!:-D

            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