GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-Oct-2005, 21:58
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Building a Release?


This should not be a difficult question, but I don't know how to do it.

I'm using the Microsoft Visual Studio .NET 2003 and I'm programming in Microsoft Visual C++. My doubt is: once that I've written a program (I've run that program in the Debug mode) and I want to create a release version. What should I do? I just want to create a program to be recorded in a CD and so, it could be executed from the CD or it could be executed in other computer by copying all the files from that CD. Is it possible?

Thanks and sorry for that silly question
  #2  
Old 06-Oct-2005, 22:14
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


I think that the problem is that I don't know how to create the .pch file, cos I've an error that says: "Cannot open precompiled header file"

According to a readme that I've found:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named Win32.pch and a precompiled types file named StdAfx.obj.

But how should I use those files?
  #3  
Old 06-Oct-2005, 22:21
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


I've managed it!

Thanks anyway
  #4  
Old 06-Oct-2005, 23:37
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


Just a last question... if now I took my release to a different computer, it should work there, shouldn't it?

So, I've done that. But the release seems not to do anything. I think it is because the other computer doesn't have the Microsoft Visual C++ installed. Is it because of that? or why???
  #5  
Old 07-Oct-2005, 00:30
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 918
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough

Re: Building a Release?


Quote:
Originally Posted by gabmorod
I think it is because the other computer doesn't have the Microsoft Visual C++ installed. Is it because of that? or why???

The other computer doesn't have to have the compiler or IDE installed.
I am guessing you are trying to build a plain C++ application (unmanaged code), right?
If you are using MFC, then there are some dlls that the other computer should have installed in system32. If it doesn't, you'll have to statically link to the MFC dlls, thus importing all the relevant code into your executable file. This will greatly increase the size of your application, but it will run on any computer running some sort of Windows (or almost ).

Quote:
Originally Posted by gabmorod
But the release seems not to do anything.

You will have to offer o better explanation here. What is it supposed to do (as in what does it do on your computer)? What does it do? Does it generate an error, maybe? What error?
Once you'll describe your problem more accurately, we will be able to offer you better help.

Kind regards,
Lucian
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
  #6  
Old 07-Oct-2005, 01:26
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


Quote:
Originally Posted by LuciWiz
The other computer doesn't have to have the compiler or IDE installed.
I am guessing you are trying to build a plain C++ application (unmanaged code), right?
If you are using MFC, then there are some dlls that the other computer should have installed in system32. If it doesn't, you'll have to statically link to the MFC dlls, thus importing all the relevant code into your executable file. This will greatly increase the size of your application, but it will run on any computer running some sort of Windows (or almost ).

Can you explain me how to do that??? I don't care if the program is big, but I want that it works!



You will have to offer o better explanation here. What is it supposed to do (as in what does it do on your computer)? What does it do? Does it generate an error, maybe? What error?
Once you'll describe your problem more accurately, we will be able to offer you better help.

I mean, I click on the .exe file, but it doesn't do anything! It should open a window with my program.


Kind regards,
Lucian


Thank you very much for your help!
  #7  
Old 07-Oct-2005, 02:15
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


Sorry, I don't know if the previous post is easily understandable or not. I wrote the following in the previous post (but it is inside the quote):
----------------------------------------


Can you explain me how to do that??? I don't care if the program is big, but I want that it works!

I mean, I click on the .exe file, but it doesn't do anything! It should open a window with my program.

Thanks again
  #8  
Old 07-Oct-2005, 02:36
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 918
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough

Re: Building a Release?


Quote:
Originally Posted by gabmorod
Sorry, I don't know if the previous post is easily understandable or not. I wrote the following in the previous post (but it is inside the quote):
----------------------------------------


Can you explain me how to do that??? I don't care if the program is big, but I want that it works!

I mean, I click on the .exe file, but it doesn't do anything! It should open a window with my program.

Thanks again

Go to the Project Properties, select the General property from the left pane (it should be selected by default), and look at the Use of Mfc property in the right pane. Make sure it is set to Use MFC in a Static Library.

However, if it "doesn't do anything", I am not sure this is the problem.
I suggest you make a simple program that prints something on the screen and then pausses the output, and run it on both computers. See how that goes.

Best regards,
Lucian
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
  #9  
Old 07-Oct-2005, 03:19
gabmorod gabmorod is offline
New Member
 
Join Date: Apr 2005
Posts: 11
gabmorod is on a distinguished road

Re: Building a Release?


Quote:
Originally Posted by LuciWiz
Go to the Project Properties, select the General property from the left pane (it should be selected by default), and look at the Use of Mfc property in the right pane. Make sure it is set to Use MFC in a Static Library.


Thanks a lot, I've tried it. And I've tried to run the program in a third computer... but again, nothing. I really don't know what's happening.

If I run the application in my computer, I can see the window to interact with my camara and everything goes perfectly. But when I try to run it in a different computer: in the initial moment, I see in the task manager that there is a process with the name of my application, but it disappears quite fast and the main window doesn't open.

If you have any further idea, i'll be very happy to hear from you. Anyway, thank you very much for your great help
  #10  
Old 07-Oct-2005, 04:44
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: Building a Release?


You should go through your program and add error handling and unexpected results handling. You said something about a camera, so in your code you probably initiate some driver or interface, check the result of those initiations and other functions which may fail.
 
 

Recent GIDBlogDeveloping GUIs with wxPython (Part 2) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I divi up "replies" into pages on a forum that I'm building? compuXP MySQL / PHP Forum 3 14-Jul-2007 18:08
Problem with building raptorhawk C++ Forum 23 20-May-2005 16:22
Microsoft Search on the verge of release? Div Search Engine Optimization Forum 12 24-Jan-2005 17:44
CFileDialog::DoModal() blocks in Release configuration wschalch MS Visual C++ / MFC Forum 1 22-Oct-2004 08:07
PHP 5 beta release 1 - 29th June jrobbio MySQL / PHP Forum 0 17-Jul-2003 05:04

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:12.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.