Problem with the Release version
-
segunda-feira, 23 de julho de 2012 13:56
Hi All,
I'm working with Visual Studio 2010 C++.
I configured my program to output to Release version by switching the Solution Configuration to release.
And Build the program I saw that it didn’t gave me any warning or Errors.
But it seems that when I’m running the exe program It doesn’t work as the Debug mode (The GUI changes etc.).
How should I configure my program to produce a Release version that would be as same as the Debug Version.
Or what am I missing with it.Thanks,
Shimon.
Todas as Respostas
-
segunda-feira, 23 de julho de 2012 14:08
When you built the Release version, did you actually get a compiled version?
Check the Release folder to see when the EXE was last built.
You can do a Clean and then rebuild the Release version, and see if that solves your issues.
Cameron Conacher
-
segunda-feira, 23 de julho de 2012 14:37
Hi Camron,
I've deleted the entire Release folder and rebuild it.
And run the new generated version.
My problem is that when I'm running the exe file it run's a problematic GUI.
I.e. the GUI changes when I run it with the Release version on a different computer.
The funny thing is that it runs as it supposed to on the P.C that it has been developed
I thought that I need to run it (i.e. the exe file) when it has the release folder on the other computer, but it worked the same.Any ideas?
Shimon.- Editado ShimonShami segunda-feira, 23 de julho de 2012 14:40
-
segunda-feira, 23 de julho de 2012 14:52
Sorry Shimon,
I am trying to understand the problem you have.
I believe you have successfully created a NEW Release version of your application, and when you copy this EXE version to another computer, you see different results than you do on your development machine?
Is that true?
Can you add a message box at start up time so that on the "other" machine, you can see for certain that you are installing the most recent version of your application?
Then can you describe with a bit more detail what ever the GUI changes are that you see on the new computer?
Perhaps you will find that somehow an incorrect version is copied, or is being executed. I know this is a bit of a stretch, but lets rule out whatever we can. And then you will be left with only the problem :-)
Cameron Conacher
-
segunda-feira, 23 de julho de 2012 15:04
One more thought here Shimon,
Is the GUI difference you mention related to your other posting about the BMP display?
Have you copied the BMP to the new maching, and made it available from whatever folder the application is expecting to find it?
Cameron Conacher
-
segunda-feira, 23 de julho de 2012 15:09
Hi Camron,
Thanks for your advices.
You've described my problem as it is i.e. I see a different output with the Release version on the second P.C.
The changes are as follows:
1st: The bmp files on the Dialog are changing i.e. I've got two bmp files that one of them "covers" the other and it seems that with the Release version it's not covering the 2nd bmp file.
2nd: There are a few “Static Text” on the mentioned Dialog and when I'm running the program on the developing P.C I can see them but when I'm running it on the 2nd P.C they disappear...I really need a suggestion regarding it.
Thanks,
Shimon -
segunda-feira, 23 de julho de 2012 15:12
Hello Shimon,
Can you post your code so I can look into it for you?
Cameron Conacher
-
segunda-feira, 23 de julho de 2012 15:17
I suggest that before you copy the RELEASE version of the executable to the target machine, be sure that you have compiled using the /MT switch to ensure that there are no dependencies on DLL's other than those of the operating system.
Apart from that, you should also be telling us the resolution of the monitor on both the development machine and the target machine, as well as the bit depth.
-
segunda-feira, 23 de julho de 2012 16:21
In case you're using VS Pro (and higher) you can build your executable with debug information (define _DEBUG for Release configuration and turn off optimization)), deploy it to the remote PC, install debug monitor on that PC and debug your application remotely. Debug output console can give you a lot of information about what is going on inside your application.
You can find details about remote debugging here: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx
Sergey
-
terça-feira, 24 de julho de 2012 01:05
Hi Camron,
I sense that your problem is not so much with the release version per se, but rather that you are running it on a different computer, one which has a DPI (dots per inch) setting different from your development machine.
I've deleted the entire Release folder and rebuild it.
And run the new generated version.
My problem is that when I'm running the exe file it run's a problematic GUI.
I.e. the GUI changes when I run it with the Release version on a different computer.
The funny thing is that it runs as it supposed to on the P.C that it has been developed
I thought that I need to run it (i.e. the exe file) when it has the release folder on the other computer, but it worked the same.
MFC dialogs are laid out in terms of "dialog units", and the number of pixels per dialog unit depends on the DPI setting of the computer.
David Wilkinson | Visual C++ MVP -
terça-feira, 24 de julho de 2012 06:41
Hi Brian,
Can you please tell me how should I reach the following?
suggest that before you copy the RELEASE version of the executable to the target machine, be sure that you have compiled using the /MT switch to ensure that there are no dependencies on DLL's other than those of the operating system.Is it on the: Configuration properties / C/C++/ Code Generation/ Runtime Library? (It's on /MT)
And regarding the second question:
Regarding the second question about the screen resolutions:
Development machine is: 1920X1024 (16X9).
Target machine is: 1280X1024 (4X3).Regarding the bit depth (DPI and the "dialog Units") I don't know where to look for it.
Thanks,
Shimon.- Editado ShimonShami terça-feira, 24 de julho de 2012 07:44
-
terça-feira, 24 de julho de 2012 09:38
Hi Brian,
The screen resolution of the target machine should not matter; it is the DPI setting that is important.
Can you please tell me how should I reach the following?
suggest that before you copy the RELEASE version of the executable to the target machine, be sure that you have compiled using the /MT switch to ensure that there are no dependencies on DLL's other than those of the operating system.
And regarding the second question:
Regarding the second question about the screen resolutions:
Development machine is: 1920X1024 (16X9).
Target machine is: 1280X1024 (4X3).
Regarding the bit depth (DPI and the "dialog Units") I don't know where to look for it.
On a Windows 7 machine, the DPI setting can be seen in Display Settings->Set custom text size (DPI). However there is nothing that you can (or should) do about this on the target machine. The user has set the DPI setting the way that he/she wants it. Rather, you need to code your application so that it works with any DPI setting.
If you are overlaying bitmaps on a dialog, you probably have to resize your dialog so that its client area is the same size (in pixels) on all systems. Right now, if you call GetClientRect() on your dialog, I think you will get different results on your development and target systems (if not, perhaps I am leading you in the wrong direction).
David Wilkinson | Visual C++ MVP- Sugerido como Resposta Damon ZhengMicrosoft Contingent Staff, Moderator terça-feira, 31 de julho de 2012 08:36
- Marcado como Resposta Damon ZhengMicrosoft Contingent Staff, Moderator terça-feira, 31 de julho de 2012 11:03

