Show
Ignore:
Timestamp:
06/27/07 15:40:03 (1 year ago)
Author:
patrick
Message:

Merges from the trunk:

r20345: Change the preprocessor symbols that we use for identifying debug

and optimized builds. Instead of using _DEBUG and _OPT, we now look
for JUGGLER_DEBUG and JUGGLER_OPT or module-specific identifiers
such as GADGET_DEBUG and GADGET_OPT. Using _DEBUG was a bad idea
because it is used by Visual C++ to identify when the debug runtime
is to be linked. This caused us a lot of problems over the years.

On Windows, we now support three types of builds:

  1. Optimized and linked against the release runtime
  2. Debug-enabled and linked against the release runtime (the
    "_g" variant)
  3. Debug-enabled and linked against the debug runtime (the "_d"
    variant)

Automatic linking takes care of choosing the correct .lib file as
long as _DEBUG is not defined explicitly. Instead, it should only
be defined implicitly as a result of using /MDd when compiling.
User-level code on any platform should define JUGGLER_DEBUG or the
module-specific …_DEBUG symbol to indicate that debugging
capabilities are desired.

r20357: Using /DEBUG when linking causes problems with Visual C++ 7.1 and

automatic linking when the desired outcome is to link against the
"_g" DLL variant. For some reason, /DEBUG causes linking against
both the "_g" variant and the "_d" variant, and that makes
application execution go quite poorly. Visual C++ 8.0 does not
seem to exhibit this behavior, but I have changed those .vcproj
files, too.

This change includes incidental modifications made by Visual Studio
as a result of editing the linker settings in the project files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/gadgeteer/gadget/gadgetConfig.h

    r19729 r20363  
    4848#undef PACKAGE_VERSION 
    4949 
    50 #ifdef _DEBUG 
     50/* 
     51 * If either JUGGLER_DEBUG or _DEBUG is defined, that implies the need for 
     52 * GADGET_DEBUG. 
     53 */ 
     54#if ! defined(GADGET_DEBUG) && (defined(JUGGLER_DEBUG) || defined(_DEBUG)) 
    5155#   define GADGET_DEBUG 
    52 #else 
     56/* If JUGGLER_OPT is defined, make sure that GADGET_OPT is also defined. */ 
     57#elif defined(JUGGLER_OPT) && ! defined(GADGET_OPT) 
    5358#   define GADGET_OPT 
    5459#endif