Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would first determine what requirements are needed from the library:</p> <ol> <li>Debug/Release</li> <li>Unicode support</li> <li>And so on..</li> </ol> <p>With that determined you can then create configurations for each combination required by yourself or other library users.</p> <p>When compiling and linking it is very important that you keep that libraries and executable consistent with respect to configurations used i.e. don't mix release &amp; debug when linking. I know on the Windows/VS platform this can cause subtle memory issues if debug &amp; release libs are mixed within an executable.</p> <p>As Brian has mentioned to Visual Studio it's best to use the Configuration Manager to setup how you want each configuration you require to be built.</p> <p>For example our projects require the following configurations to be available depending on the executable being built.</p> <ol> <li>Debug+Unicode</li> <li>Debug+ASCII</li> <li>Release+Unicode</li> <li>Release+ASCII</li> </ol> <p>The users of this particular project use the Configuration Manager to match their executable requirements with the project's available configurations.</p> <p>Regarding the use of macros, they are used extensively in implementing compile time decisions for requirements like if the debug or release version of a function is to be linked. If you're using VS you can view the pre-processor definitions attribute to see how the various macros are defined e.g. _DEBUG _RELEASE, this is how the configuration controls whats compiled.</p> <p>What platform are you using to compile/link your projects?</p> <p>EDIT: Expanding on your updated comment..</p> <p>If the <strong>Configuration Manager</strong> option is not available to you then I recommend using the following properties from the project:</p> <ul> <li><strong>Linker</strong>-><strong>Additional Library Directories</strong> or <strong>Linker</strong>-><strong>Input</strong></li> </ul> <p>Use the macro <code>$(ConfigurationName)</code> to link with the appropriate library configuration e.g. Debug/Release.</p> <pre><code>$(ProjectDir)\..\third-party-prj\$(ConfigurationName)\third-party.lib </code></pre> <ul> <li><strong>Build Events</strong> or <strong>Custom Build Step</strong> configuration property</li> </ul> <p>Execute a copy of the required library file(s) from the dependent project prior (or after) to the build occurring.</p> <pre><code>xcopy $(ProjectDir)\..\third-party-prj\$(ConfigurationName)\third-party.dll $(IntDir) </code></pre> <p>The macro <code>$(ProjectDir)</code> will be substituted for the current project's location and causes the operation to occur relative to the current project. The macro <code>$(ConfigurationName)</code> will be substituted for the currently selected configuration (default is <code>Debug</code> or <code>Release</code>) which allows the correct items to be copied depending on what configuration is being built currently.</p> <p>If you use a regular naming convention for your project configurations it will help, as you can use the <code>$(ConfigurationName)</code> macro, otherwise you can simply use a fixed string.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload