Thread: Minimum Requirements fro Executable to Run?

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    Minimum Requirements fro Executable to Run?

    When I compile code on my computer into an executable it runs on my computer. Presumably, if I moved the executable to a similar computer it would also run. How do I determine what the (minimum) hardware and software requirements are for this computer?

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    you wrote the program so you should already know that information. MS Visual Studio has a program called depends.exe that will show all the DLLs that the program needs, but I don't know of anything that shows the hardware.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    As far as hardware goes, the processor needs to be the same number of bits (although some 64 bit processors can run 32 bit applications). Also the processor needs to have the same instruction set, and the same endianess.

    For software, any libraries which are dynamically linked must be present on the target machine. Also, the binary executable format needs to be the same. For instance, Windows uses the PE format, whereas Linux uses ELF.

  4. #4
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by thetinman
    How do I determine what the (minimum) hardware requirements are for this computer?
    In reality? test it. run your program on as many machines as you can get your hands on. post your app on the web and ask people to test it on their machines.

    For a beginning project? since beginners projects are usually fairly small, it should run on almost any hardware that supports windows!
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  5. #5
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    If your project is huge, you probably should have the time/budget/reputation to obtain many test platforms. Otherwise, you probably won't need to run it on multiple platforms anyway.

    Note that large, complex programs often depend on machine/platform-specific features, such as APIs, so you shouldn't worry about your Windows app not running on a Mac. You'll need to recompile it for different platforms. That said, you should try to make your code as platform-independent as possible in the first place.




    How do I determine what the (minimum) hardware requirements are for this computer?
    Run it in benchmark mode, then measure the CPU/memory it uses.

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    So if I compile my code on an Athlon 3700 using the laster MS compiler, it could very well run on an Pentium 200? My concern is that the program might try to use some instruction set that exists on my Athlon, but not on the ancient Pentium.

    Can I compile for Macs using MSVC++ or some other Windows compiler?

    And by the way, the file itself is a DLL file.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Can I compile for Macs using MSVC++ or some other Windows compiler?

    And by the way, the file itself is a DLL file.
    No -- you have to compile it for the target operating system and MSVC is not a cross-compiler. I think MS-Windows is the only os that uses DLLs. They are unusable in *nix and probably MAC too. So attempting to port that DLL to another os will probably entail a 100% rewrite.

  8. #8
    #define WORLD "sad place" LinuxCoder's Avatar
    Join Date
    Mar 2006
    Location
    Portugal
    Posts
    89
    Hi, if the code used in the library is not Windows platform-specific code but general C/C++ code then (*IN THEORY*) all you'd have to do was to compile it again on another platform. Of course almost 100% of the times you'll need to rewrite some code. Apart from all the huge platform differences even subtle differences like function names or arguments will need to be taken care of. Like Sleep() on windows vs sleep() on linux. All those will need to be taken care of.

    Cheers
    Last edited by LinuxCoder; 04-04-2006 at 06:07 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading a DLL that is not in the same directory as the executable
    By starcatcher in forum Windows Programming
    Replies: 10
    Last Post: 12-13-2008, 07:05 AM
  2. Getting a C# program with a manifest file to run in the debugger
    By Xarzu Athanasop in forum C# Programming
    Replies: 0
    Last Post: 01-18-2008, 06:34 PM
  3. CreateProcess with Resource of executable, not the Filename
    By Ktulu in forum Windows Programming
    Replies: 4
    Last Post: 11-04-2006, 01:07 AM
  4. How to run executable?
    By hugo in forum C++ Programming
    Replies: 5
    Last Post: 03-20-2002, 04:05 PM