# Program works on build computer, but not others.

This topic is 4571 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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]

##### Share on other sites
Try placing the executable in a different directory on your machine and seeing if it still works.

##### Share on other sites
Working on windows? Use crash dumps:
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp

and see exactly where it crashes!

##### Share on other sites
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]

##### Share on other sites
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).

##### Share on other sites
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...

1. 1
2. 2
3. 3
frob
20
4. 4
Rutin
19
5. 5

• 32
• 13
• 11
• 9
• 18
• ### Forum Statistics

• Total Topics
632555
• Total Posts
3007066

×