VC2010 compile fixes #949

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2012_03_vc2010compilefixes changing 11 files +53 −19
  1. laanwj commented at 10:58 PM on March 18, 2012: member

    I spent some time today trying to get Bitcoin to compile with MSVC2010. Eventually got it to work nicely. I'll publish the solution and build files this week.

    However there were quite some surprises:

    • Define WIN32_LEAN_AND_MEAN in serialize.h to prevent winsock compile errors.
    • CService::SetPort, was mysterious unresolved external. Turned out to be a macro issue, windows defines SetPort
    • strprintf problem: http://stackoverflow.com/questions/222195/are-there-gotchas-using-varargs-with-reference-parameters
      • works in g++, but in MSVC causes horrible crashes.
    • NOMINMAX needs to be defined before include of windows.h to prevent windows from defining min and max macros, and std::min and std::max from causing compile errors
    • pid_t needs to be defined for compatibility

    All these are fixed in this patch. The changes are trivial.

    This still builds in Linux, however I still need to test whether this doesn't break the gitian cross-compile.

  2. gavinandresen commented at 12:25 AM on March 19, 2012: contributor

    ACK for 0.7

  3. luke-jr commented at 12:50 AM on March 25, 2012: member

    This breaks in combination with (now merged) #969.

  4. laanwj commented at 6:59 AM on March 25, 2012: member

    Yes, I'll rebase it when 0.6 is released

  5. sipa commented at 2:21 PM on April 2, 2012: member

    Can you rebase?

  6. laanwj commented at 5:56 PM on April 3, 2012: member

    rebased

    I suppose we can get this into 0.6.1?

  7. VC2010 compile fixes 52d3a48128
  8. laanwj referenced this in commit fc8c44e3d5 on Apr 3, 2012
  9. laanwj merged this on Apr 3, 2012
  10. laanwj closed this on Apr 3, 2012

  11. coblee referenced this in commit 77fcd8bacf on Jul 17, 2012
  12. laanwj deleted the branch on Apr 9, 2014
  13. suprnurd referenced this in commit c05231c2a7 on Dec 5, 2017
  14. ptschip referenced this in commit 7d0f4cf7ed on Feb 13, 2018
  15. lateminer referenced this in commit 9e4c3576af on Oct 30, 2019
  16. lateminer referenced this in commit fa40040f80 on Oct 30, 2019
  17. lateminer referenced this in commit 05594c852a on Oct 30, 2019
  18. lateminer referenced this in commit e815815fdc on Oct 30, 2019
  19. DrahtBot locked this on Sep 8, 2021

Milestone
0.7.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me