Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3404896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:26:20+00:00 2026-05-18T05:26:20+00:00

Motivation for Question : Generating 64-bit and 32-bit code requires two seperate full-program-compiles, and

  • 0

Motivation for Question: Generating 64-bit and 32-bit code requires two seperate full-program-compiles, and when using visual studio (as detailed below) release and debug builds are incompatible, therefore seemingly requiring another two full-program-compiles (bringing the total up to four). I would like to stick with two full-program-compiles, but I am confused.

When Debugging All I Care About Is: the global state, the stack frame, and the line-number/file of the code that caused the crash. Also, I don’t care about debug info from peer-reviewed highly-stable open-source libraries; therefore, I don’t need debug-info for those libraries and a release build for this libraries should be adequate.

Evidence: I know that, in VS, if you compile a debug version of an application and link it with a release version of Google Protocol Buffers, the produced code will fail due to a side-effect of mixing release/debug types.

I would like to know if this is a side effect of using visual studio, and a certain set of compiler switches make it so.

Secondly inspecting the build scripts/processes of opensource projects it seems that it is OK to mix code generated in debug mode with code generated in release (for example mumble). I guess this has something to do with the distinction between release and ReleaseWithDebugInfo (term borrowed from cmake, but this is obviously expressable within Visual Studio). ReleaseWithDebugInfo is afterall an optimised version of the binary, with debugging info also generated, and therefore suitable for release.

The Questions :

  1. Could someone please explain, or provide references, as to what switches make the code incompatible.
  2. Is the ReleaseWithDebugInfo style of compiling in visual studio enough for both debug and release use-cases (according to my criteria, as explained above)? –i.e., is whatever the compiler generates in debug mode overkill or redundant ?
  3. In ReleaseWithDebugInfo mode (for my application) can I compile external dependanies in release mode (without debug info) and not have any undefined behaviour ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:26:21+00:00Added an answer on May 18, 2026 at 5:26 am

    Whether debug mode (by which I take it you mean unoptimized) code is ‘overkill’ depends on what you want to do with it.

    If you want to use the debugger, stepping lines very accurately and inspecting any variable you come across, you’ll need to turn off optimisation. If you don’t care some much about that, then you can leave it turned on, and put up with some strange behaviour in the debugger.

    If you compile for edit-and-continue, there’ll be lots of padding put around the place to allow partial compiles/links.

    So there is lots of ‘overkill’ and ‘redundancy’ to unoptimised code, but they may still be valuable.

    The usual problem with linking different configurations is when they’re sharing objects allocated by different versions/configurations of the run-time-libraries. If you’re using a Win32-style ‘C’-style interface between libraries, then you rarely care if one’s debug and one’s release. If you allocate a CString on the heap with one version of the run-time, and then pass it to code which deallocates with a different run-time, then there will often be problems.

    There are three different things you need to think about here:

    • Do I need debugging symbols? – you can make these in any debug/release configuration
    • Do I need good debuggability or do I need good code-optimisation?
    • What CRT/STL/whatever version is everybody using?

    It’s only the last one you really need to get perfect. The other two are personal preference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My primary motivation for asking this question is this uservoice suggestion . Jeff declined
How can I open a web-page and receive its cookies using PHP? The motivation
My motivation for this question is really just to specify an image to be
Motivation I'd like to find a way to take an arbitrary color and lighten
I'd like to hear what is the motivation behind the bulk of sealed classes
I have a service that accepts callbacks from a provider. Motivation : I do
When working on a project, after the interesting parts are coded, my motivation is
What are the motivations for using a message based system? I'm seeing a lot
(in case you're curious about motivation: this will be used in a scons build
EDIT The original reasoning for this question was a pretty serious case of bad

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.