c++ - Visual Studio need to rebuild solution for every change -


i working on game engine in c++. have progressed further project, have noticed resulting executable not reflect latest code changes. cleaning solution , rebuilding it, fixes problem. unfortunately complete rebuild not viable option larger code base anymore.

i have checked different solutions on stackoverflow:

  • i have checked "build , run" setting set "always build"
  • the configuration manager set "build"

additional information:

  • it opengl project glfw , glad in c++
  • i use visual studio community 2017 version 15.2

this annoying issue causes lot of productivity loss, since have rebuild entire solution every time want see change. grateful input. please ask if more information required.

i don't know if of relevance, when making small change testscene.cpp , rerunning code: enter image description here


update

here in depth explanation of issue:

  1. i have class allows rotate object transformerscript.cpp
  2. i have set rotation speed 1.
  3. the object rotates expected.

enter image description here

  1. now change speed float value 1 0.
  2. i press run (local windows debugger)
  3. this output log:

1>------ build started: project: star-engine, configuration: debug x64 ------

1>transformerscript.cpp

1>c:\users\haeri\documents\github\space-engine\star-engine\src\header\matrix4f.h(44): warning c4267: 'argument': conversion 'size_t' 'unsigned int', possible loss of data

1>c:\users\haeri\documents\github\space-engine\star-engine\src\header\matrix4f.h(44): warning c4244: 'initializing': conversion 'float' 'int', possible loss of data

1>c:\users\haeri\documents\github\space-engine\star-engine\src\header\matrix4f.h(45): warning c4267: 'argument': conversion 'size_t' 'unsigned int', possible loss of data

1>c:\users\haeri\documents\github\space-engine\star-engine\src\source\transformerscript.cpp(13): warning c4244: 'argument': conversion 'double' 'float', possible loss of data

1>compiling...

1>generating code...

1>skipping... (no relevant changes detected)

1>testscene.cpp

1>star-engine.vcxproj -> c:\users\haeri\documents\github\space-engine\x64\debug\star-engine.exe

c:\users\haeri\documents\github\space-engine\star-engine\src\source\glad.c(51): warning c6308: 'realloc' might return null pointer: assigning null pointer 'exts_i', passed argument 'realloc', cause original memory block leaked.

c:\users\haeri\documents\github\space-engine\star-engine\include\stb\stb_image.h(3667): warning c6001: using uninitialized memory 'coutput'.

1>star-engine.vcxproj -> c:\users\haeri\documents\github\space-engine\x64\debug\star-engine.pdb (partial pdb)

1>done building project "star-engine.vcxproj".

========== build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

  1. the compiled executable starts
  2. the result same figure rotating @ same speed.
  3. expected behavior: no rotation, since float set 0.
  4. i forced "clean solution" , "rebuild solution"
  5. this takes 1 2 minutes on laptop
  6. vs finishes rebuilding new solution
  7. i press run (local windows debugger)
  8. the object not moving. (this expected)

alternative approach

  1. set break point @ position of speed float value
  2. i press run (local windows debugger)
  3. sometimes (90% of cases) error prompt pops up. other times (10% of cases) works expected

enter image description here

  1. i press ok
  2. the compiled executable starts
  3. the result same figure rotating @ same speed.
  4. expected behavior: no rotation, since float set 0.
  5. the break point not triggered!

if changes in header file need full rebuild changes reflected think.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -