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?

04-02-2006

Ancient Dragon

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.

04-02-2006

bithub

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.

04-02-2006

ChaosEngine

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!

04-03-2006

jafet

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.

Quote:

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.

04-04-2006

thetinman

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.

04-04-2006

Ancient Dragon

Quote:

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.

04-04-2006

LinuxCoder

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.