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. compile code twice,why the two result is differrent

compile code twice,why the two result is differrent

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelptutorialannouncement
5 Posts 5 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.
  • Y Offline
    Y Offline
    yingkou
    wrote on last edited by
    #1

    Compile same code twice, why the result(exe) is not same。both release mode and debug mode exist the same problem。if want to get same result, how to setting to the project, such as compile option。

    S S L C 4 Replies Last reply
    0
    • Y yingkou

      Compile same code twice, why the result(exe) is not same。both release mode and debug mode exist the same problem。if want to get same result, how to setting to the project, such as compile option。

      S Offline
      S Offline
      Stefan_Lang
      wrote on last edited by
      #2

      What did you do, exactly, to get to this observation? Usually, when you build a project, you overwrite the previous build, so there's nothing to compare it to.

      1 Reply Last reply
      0
      • Y yingkou

        Compile same code twice, why the result(exe) is not same。both release mode and debug mode exist the same problem。if want to get same result, how to setting to the project, such as compile option。

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #3

        The differences are probably superficial. For example, an exe or dll contains a date-time stamp which specifies the time it was linked.

        Steve

        1 Reply Last reply
        0
        • Y yingkou

          Compile same code twice, why the result(exe) is not same。both release mode and debug mode exist the same problem。if want to get same result, how to setting to the project, such as compile option。

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Can you explain little more please. What do you mean that result is not same? output?you just clear all in build option and rebuild the solution again.

          1 Reply Last reply
          0
          • Y yingkou

            Compile same code twice, why the result(exe) is not same。both release mode and debug mode exist the same problem。if want to get same result, how to setting to the project, such as compile option。

            C Offline
            C Offline
            Cristian Amarie
            wrote on last edited by
            #5

            I suppose you are compiling with VS. What differs is a timestamp added by compiler (more precisely, by linker). I don't remember where, but I think is somewhere in IAT. You can patch those bytes (I think is a __int64, most likely a FILETIME) either by patching the binary or by setting system time (not sure since you don't know when exactly the linking occurs).

            Nuclear launch detected

            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