Answers.Body: <p>This question should be in programming.</p>
  
  <p>These can be put in a top h file, the best being stdafx.h.  Just include "#define DNDEBUG",</p>
  
  <p>They can be added to the command line/compiler commands.  Under VS6, Project->Settings (Alt+f7), there is a box to add project settings under the c/c++ tab.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-05T18:55:12.427Z
Answers.Text: I can't seem to find stdafx.h. Do you know where it is? Also do you know what the name of the box that I can add project settings to?
Answers.UserDisplayName: user23783
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-05T22:39:12.413Z
Answers.Text: Stdafx.h is automatically created when you make a new project, so that wouldn't be included in the download, my error.  (When I began, I always had the error that the compiler couldn't find stdafx.h and just created a dummy workspace and added code as a project.) I have the debug option in the "Project Options" box, so I assume that would be correct.
Answers.UserDisplayName: Mike Jones
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-05T18:39:52.013Z
Answers.LastActivityDate: 2020-06-05T18:39:52.013Z
Answers.UserDisplayName: Mike Jones
Body: <p>How do you manually set switches when you are compiling Stockfish in Visual Studio?</p>
  
  <p>In the type.h file it saids:</p>
  
  <blockquote>
    <p>When Makefile is not used (e.g. with Microsoft Visual Studio) some switches
    need to be set manually:</p>
    
    <p>-DNDEBUG      | Disable debugging mode. Always use this for release.</p>
    
    <p>-DNO_PREFETCH | Disable use of prefetch asm-instruction. You may need this to
                  | run on some very old machines.</p>
    
    <p>DUSE_POPCNT  | Add runtime support for use of popcnt asm-instruction. Works
                 | only in 64-bit mode and requires hardware with popcnt support.</p>
    
    <p>-DUSE_PEXT    | Add runtime support for use of pext asm-instruction. Works
                  | only in 64-bit mode and requires hardware with pext support.</p>
  </blockquote>
  
  <p>I just want to where where/how do you put these "commands"?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-05T18:16:12.317Z
Comments.Text: This is just off-topic.
Comments.UserDisplayName: SmallChess
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-05T18:27:36.257Z
Comments.Text: sorry, do you know where i should move the thread to?
Comments.UserDisplayName: user23783
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-05T18:32:26.797Z
Comments.Text: also im just wondering, how is this off topic? i just want to know so i can prevent this from happening again in the future.
Comments.UserDisplayName: user23783
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-05T18:33:18.040Z
Comments.Text: Compiling C++ source code shouldn't be on-topic but I could be wrong. Let's leave the community to decide.
Comments.UserDisplayName: SmallChess
Tags: <engines><stockfish>
Title: How do you manually set switches when you are compiling Stockfish in Visual Studio?
ThreadText: # How do you manually set switches when you are compiling Stockfish in Visual Studio?
  
  (Asked by: username_0 on 2020-06-05)
  
  How do you manually set switches when you are compiling Stockfish in Visual Studio?
  
  In the type.h file it saids:
  
  > When Makefile is not used (e.g. with Microsoft Visual Studio) some switches
  > need to be set manually:
  >
  > -DNDEBUG | Disable debugging mode. Always use this for release.
  >
  > -DNO\_PREFETCH | Disable use of prefetch asm-instruction. You may need this to
  > | run on some very old machines.
  >
  > DUSE\_POPCNT | Add runtime support for use of popcnt asm-instruction. Works
  > | only in 64-bit mode and requires hardware with popcnt support.
  >
  > -DUSE\_PEXT | Add runtime support for use of pext asm-instruction. Works
  > | only in 64-bit mode and requires hardware with pext support.
  
  I just want to where where/how do you put these "commands"?
  
  **Tags:** engines, stockfish
  
  > **Comments:**
  > **username_1**: This is just off-topic.  
  > **username_0**: sorry, do you know where i should move the thread to?  
  > **username_0**: also im just wondering, how is this off topic? i just want to know so i can prevent this from happening again in the future.  
  > **username_1**: Compiling C++ source code shouldn't be on-topic but I could be wrong. Let's leave the community to decide.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-06-05. Score: 1
  
  This question should be in programming.
  
  These can be put in a top h file, the best being stdafx.h. Just include "#define DNDEBUG",
  
  They can be added to the command line/compiler commands. Under VS6, Project->Settings (Alt+f7), there is a box to add project settings under the c/c++ tab.
  
  > **Comments:**
  > **username_0**: I can't seem to find stdafx.h. Do you know where it is? Also do you know what the name of the box that I can add project settings to?  
  > **username_2**: Stdafx.h is automatically created when you make a new project, so that wouldn't be included in the download, my error.  (When I began, I always had the error that the compiler couldn't find stdafx.h and just created a dummy workspace and added code as a project.) I have the debug option in the "Project Options" box, so I assume that would be correct.  
  
  ---
  
  