Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new in VC++ and MFC, I am creating one application in the MFC with VC. I found that when I build the project it create the .obj file for .cpp file in the debug folder.

Now my question is when I am doing deployment of this project I require to include this .obj file? because I found that even if I remove the .obj file and run the exe still it is working. so at time of deplyoment to other pc it is require to include it.

And another question is obj file size is different if build project in debug mode and release mode so is it normal ?

Can any one help me on these two question ?

Thanks in advance.
Posted

1 solution

No you don't need it for executing the application. It is an intermediary object file, used by the linker to make the executable. It is common practice to specify a directory for the intermediary files that is different from the output directory, in order to make clean-up and deployment operations clearer and easier.

Also, the object file will be larger when compiled in DEBUG because it contains the required debug information. I'm sure you will find out more about that as you do more development work.

Regards,
Ian.
 
Share this answer
 
v2
Comments
npdev13 2-May-13 7:43am    
Ok thanks for quick answer, can you please confirm one thing ?
what setting I need to do so it intermediate file store in different directory?
Ian A Davidson 2-May-13 7:55am    
No worries. I'd just logged on and it was the first question I saw :)
I've just read your second question and made an addition to my answer about that.
I hope you will enjoy learning VC++.
Regards,
Ian.
npdev13 2-May-13 9:49am    
Yes. Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900