c++ - Solving the Visual Studio 2010 AlwaysCreate rebuild issue -


i've c++ project i'm porting vs2008 vs2010. when build project, visual studio 2010 reports build successful if press f5 start debugger i'm told project not date. if ignore warning, can continue debugging ok, if press ok, whole project (many hundreds of source files), gets rebuilt scratch. output contains following;

1>------ build started: project: sccw-vc2010, configuration: debug win32 ------ 1>build started 15/11/2010 14:47:40. 1>initializebuildstatus: 1>  creating "debug\sccw-vc2010.unsuccessfulbuild" because "alwayscreate" specified. 1>midl: 1>  outputs up-to-date. 1>clcompile: 1>  tinedit.cpp 1>  _win32_winnt not defined. defaulting _win32_winnt_maxver (see winsdkver.h) 1>  automatically linking sfl504d.lib 1>  automatically linking ot1104d.lib 1>c:\program files\rogue wave\stingray studio 10.4\include\toolkit\sectndlg.h(134): warning c4996: 'strcpy': function or variable may unsafe. consider using strcpy_s instead. disable deprecation, use _crt_secure_no_warnings. see online details. 1>          c:\program files\microsoft visual studio 10.0\vc\include\string.h(105) : see declaration of 'strcpy' 1>  automatically linking og1204d.lib 1>  automatically linking rwuxthemed10.lib 1>  profile.cpp 1>  zoffsetdialog.cpp 

half hour later, once build finished, debugger starts. guess message

creating "debug\sccw-vc2010.unsuccessfulbuild" because "alwayscreate" specified.

is part of problem, cant tie project setting. i've found some on google, nothing has worked far. else had problem , know of fix?

edit: per jalf's suggestion in comments below, have created new projected, imported files project, , new project has same problems. specifically, copied on following groups;

<clcompile include="..\mydir\myfile.cpp"/> <clinclude include="..\mydir\myfile.h" /> <none include="res\myfile.ico" />  (and similar resources) <library include="..\mydir\myfile.lib" /> 

edit2: after going through header includes found 3 did not exist. removing them , doing rebuild on original project seems have fixed problem. of blog posts mention problem refer bug, , 2 days of lost time later, tend agree. answers , comments provided.

edit3: , 1 day later problem back! making edit file in project once again causes full rebuild. per john dibling's answer, project include static libraries, including stingray. i'm ditching vs2010 , moving vs2008, have deadlines. related information, see following links;

vs2010 thinks project out of date nothing has changed

http://social.msdn.microsoft.com/forums/en-us/vcgeneral/thread/38c08137-3bb0-4143-b97f-72d077646318

http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx

final edit release of vs2010 sp1 has solved problem, , builds fast , efficient.

i've had problem many times , frustrating. i'll tell problem in case, first have ask you:

  • did rebuild-all before tried running first time, or rebuild?
  • once rebuild all, ask yet again rebuild if you've made no changes?

the problem in case complex. had custom build rules copies binaries stingray source directory (where lived) directory in build tree. binaries marked dependancy, copied before each build in case changed.

the dependancy checked looked @ timestamps of these files see when changed. if blah.lib had mod date of last december in it's source directory, when copied have same mod date. dependancy checked note "hey file's pretty old, have rebuild it," , ask if wanted full rebuild.

for while got by saying "no," fixed problem changing custom build rule write new text file after did file copy. make new text file dependancy, , not blah.lib file, , made compiler happy.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -