Gesperrt Casablanca MFC Errors?

  • Dienstag, 1. Mai 2012 04:32
     
     

    Greetings,

    Maybe I'm missing something simple, but I created a simple win32 console to test out casablanca and had no problems.  However, my main application(s) are MFC and creating the same console application with MFC support results in a ton of conflicts for azure storage. I thought I would ask here first before I spend time on it. 

    Repro:

    1. Create a simple console application with MFC support

    2. Add header/lib references and paths

    3. include <azurestorage.h> and using namespace

    Thanks!

    Jay

Alle Antworten

  • Dienstag, 1. Mai 2012 13:03
    Besitzer
     
     

    No, you're not missing anything! We simply haven't tested with MFC, we were more focused on server-side and Windows 8.

    Let us take a look at it and see if we can come up with a workaround for you!

    Niklas

  • Dienstag, 1. Mai 2012 15:44
     
     
    Thanks Niklas.  I appreciate all the work.  Casablanca looks great so far.
  • Dienstag, 1. Mai 2012 16:20
    Besitzer
     
     

    This is a bug in our header files: conflicting names of files and macros.

    Fortunately, it can be worked around by making some simple edits to the header files in the Casablanca SDK. You will lose the definition of the HTTP "TRACE" method, but that's not very commonly used, anyway.

    Krishnan will post specific instructions in just a little while, I just wanted to let you know that we're working on it.

    Thanks,

    Niklas

  • Dienstag, 1. Mai 2012 16:43
     
     Beantwortet

    Thank you for reporting the issues. There are a few bugs here. I have listed them as well as potential workarounds to unblock your work immediately. We will fix these issues in the next refersh of the Casablanca SDK.

    1. The casablanca SDK contains a header file named process.h which collides with a public CRT header file. atlbase.h includes process.h which gets resolved to the one in the casablanca SDK triggering a cascade of failures.

    Workaround:

    Rename %CASABLANCA100_SDK%\process.h to %CASABLANCA100_SDK%\actor_process.h

    Modify line 44 in %CASABLANCA100_SDK%\actors.h to

    #include "actor_process.h"

    2. xxpublic.h in the casablanca SDK defines DEBUG_NEW which is already defined in afx.h

    Workaround:

    Add the lines in bold below to %CASABLANCA100_SDK%\include\xxpublic.h (lines 19 - 26)

    #undef NEW
    #ifdef _DEBUG
    #undef DEBUG_NEW
    #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
    #define NEW DEBUG_NEW
    #else
    #define NEW new
    #endif

    3. http_msg.h uses TRACE as the name of string constant ("TRACE") to be used to specify an http method. However, afx.h defines TRACE as ATLTRACE.

    Workaround:

    Remove the use of TRACE in the %CASABLANCA100_SDK%\include\http_msg.h by commenting out the following lines

    Line 54:

        //const static method TRACE;

    Line 63:

    //__declspec(selectany) const method methods::TRACE = L"TRACE";

    --Krishnan (Microsoft)


    --Krishnan

  • Sonntag, 6. Mai 2012 18:29
     
     

    Works like a charm.  Thank you very much for looking into this and fixing it so soon.  I really appreciate it.

    Jay.