Program works on build computer, but not others.

Started by
4 comments, last by Omega147 18 years, 1 month ago
Here's the situation: I have a release build of my application, and when I run it on my computer (the computer it was compiled on), it works as intended; however, when I transfer the executable along with all required DLL's to another computer, I get some problems. Here's the problem: Some of the controls display oddly. In particular, the win32 treeview control I'm using doesn't show up on the other computer. I noticed this with another program I had a while back which used a win32 tab control, and in another program which used a listview control. My notion is that there's some connection to the Common Controls I'm using that I'm not accounting for. Quick note: I'm programming in C++ on MSVC++ 2003. My computer and all the other computers I'm testing the program on are running Windows XP SP1 (except for one comp, which is SP2). To make the treeview control available in my program, I have the following lines which initialize the treeview:
// allow the application to use tree controls
INITCOMMONCONTROLSEX controls;
controls.dwSize = sizeof(INITCOMMONCONTROLSEX);
controls.dwICC = ICC_TREEVIEW_CLASSES;
InitCommonControlsEx(&controls);
The other applications I noticed with the problem mentioned above initialized their common controls in the same manner. I'm also using OpenGL in the application, with multi-threading, but I know neither of those are giving me this trouble. As I said, runs fine on my machine, but not anyone else's. Maybe there's some stray DLL I'm not packaging along with the executable which isn't required, just optional? Not sure what the problem could be. Any help on this would be greatly appreciated. Thanks. [Edited by - Omega147 on March 6, 2006 9:36:24 PM]
Advertisement
Try placing the executable in a different directory on your machine and seeing if it still works.
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Working on windows? Use crash dumps:
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp

and see exactly where it crashes!
The location of the executable doesn't matter as long as it has the required DLL's in the same directory. And as for the crash dumps, that's an interesting tool; however it doesn't help me here. The program does not crash, it just doesn't display Common Controls. Other than that it runs fine. Any other ideas?

Edit: I've also tried using the Depends.exe program on both the build and target computer to check for required files and whatnot, and everything clears with that. Not sure what else could be causing the problem...

[Edited by - Omega147 on March 14, 2006 11:55:56 PM]
Find the common control DLL on your system which is used by your application and install it with your application. That way, it should work also on other machines (perhaps it is such an AFX DLL).

Crafter 2D: the open source 2D game framework

?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]

jeroenb, thanks for the reply. I've tried that, but no luck. However, I am concerned about the common control DLL my program is using on the build machine... According to my compiler, it's trying to use the common control DLL located here: C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1740_x-ww_7cb8ab44\comctl32.dll, rather than the much more convenient one in C:\Windows\System32 ... Not sure if that would affect anything, or why the heck it's using that DLL embedded in some long, far away folder...

This topic is closed to new replies.

Advertisement