Programming ?

Discussion in 'Automated Trading' started by Sky123987, Sep 28, 2008.

  1. Hi,

    I have written several trading strategies on my computer locally in VS C++ and it works well.

    When I take the .exe file and transfer it to another computer it doesn't work. I have found that the reason is because the other computer doesn't have the needed .dll fies. I then downloaded software that says which .dll's your program is dependent upon. I tried to copy over the .dll's over to the other computer and I JUST CANNOT GET IT TO WORK. So I installed VS C++ on that computer, compiled the source and ran the .exe.

    So... I have a computer in New York w/ out Visual Studio on it. Would I be able to download VS C++ express edition on that computer? Then from my local computer send the source to that computer and compile the program using VS C++ express? How is express limited? Does the express have a limited time use?

  2. nkhoi

    nkhoi Moderator

    I had the same probl. I think one way to avoid the probl is finding out exactly what version the other computer has then reconfig your your computer to the same version before compiling.
  3. The problem computer might need .net foundation classes installed.
  4. I am assuming you are using VC++ 7.0 or later ...

    You are more likely missing WinSxS (side-by-Side) dependencies. These are stored at C:\WINDOWS\WinSxS

    Run your exe. Check dependency packages from this folder. you can find tools at to view dependencies.

    Copy whatever is missing on your destination machine ...
  5. this is a very common issue.

    you actually don't need to mess with reinstalling an IDE on every machine...

    what you need is the Vc++ redistributable... this is an exe that contains all the dlls and setup files to make a compiled exe run on any windows machine.

    just google for vcredist sp1 and you'll find it all.

    you can also find the links here:
  6. Most likely your exe will miss the crt and mfc runtimes. Easy way to fix it is to create a small setup-project. You should then add the crt mergemodule and – if you use the mfc – also the mfc-dll you need. This works for me.

  7. Euler


    One other thing to watch out for -- sometimes if one hooks into a trading software API, there are registry entries that may refer to now-moved/-uninstalled software. You know this by the HKEY or whatever type messages but sometimes, cryptically, it just says that it can't find a file or something similar.
  8. m1k4


    there is a tool in windows os called regsvr32.exe

    deploy .dll files needed by your app on target system

    and run regsvr32 on em:

    c:\deployLoc>regsvr32 prereq.dll

    you should do this on all .dll components

    hope this helps
  9. tron_at


    What about compiling release instead of debug and "statically linking MFC" (see project options tab)? IMO you should not need any redistribution packages. But in case of .NET the client computer must have installed the correct version of the framework anyway.

  10. Sky123987, did you resolve the dependency issue ?
    #10     Oct 3, 2008