Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debug CRT vs. Relese CRT problems...

Debug CRT vs. Relese CRT problems...

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioalgorithmsdebuggingperformance
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vmaltsev
    wrote on last edited by
    #1

    Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.

    R N 2 Replies Last reply
    0
    • V vmaltsev

      Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.

      R Offline
      R Offline
      Rickard Andersson20
      wrote on last edited by
      #2

      Hm... not sure I understand... but all varibles that are not assigned a value, will be assigned a random value in Release mode. I hope I'm right! Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!

      1 Reply Last reply
      0
      • V vmaltsev

        Hail everyone, I have a program which consists of one mfc console exec, two statically linked dll and one dll which loaded with LoadLib. When I build all these stuff it works in both debug and release. But... In release I get wrong results. Program works without errors or exceptions, but it looks like some variable zeroed or mixed with others. All optimization switched off. So only difference in /MD or /MDd and in a presence of debug info. I assume that there're some things that I should take into account, but I simply don't know them. Any advices are appreciated.

        N Offline
        N Offline
        Neville Franks
        wrote on last edited by
        #3

        In a Debug build all heap allocations are initialized to specific values etc. This doesn't happen in Release builds. Check all of your variables are being initialized correctly. Also read: "Surviving the Release Version" http://www.codeproject.com/debug/survivereleasever.asp[^] Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups