Getting compilation error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajkumaragrawal
    New Member
    • Mar 2013
    • 2

    #1

    Getting compilation error

    Hi All,

    I am creating a metro application on windows8.I am using vc++ programming language. I am using mssoap toolkit to communication with the webservice( wsdl ).
    I am using following code:

    Code:
    #import "C:\Program Files\Common Files\MSSoap\Binaries\mssoap30.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")
    
    using namespace MSSOAPLib30; 
    
    #import "C:\Windows\system32\msxml4.dll"
    using namespace MSXML2;
    After adding above code I am getting following error message:

    c:\program files\microsoft visual studio 11.0\vc\include \comdef.h(64): fatal error C1075: end of file found before the left brace '{' at 'c:\sample\app7 \app7\debug\mss oap30.tlh(19)' was matched

    Please Assist me solve above error message.
    Note: if I create non metro application then above code work fine without a issue.
    Last edited by weaknessforcats; Mar 18 '13, 02:24 PM. Reason: added code tags
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Remember, a \ is an escape sequence in C/C++. I expec this path:
    Code:
    #import "C:\Windows\system32\msxml4.dll"
    needs to be:
    #import "C:\\Windows\\s ystem32\\msxml4 .dll"

    I'm kinda guessing here since # is a preprocessor line and not a C/C++ line. However, the #import is a Microsoft thing and they might have required a \\ to get a \ .

    Comment

    • rajkumaragrawal
      New Member
      • Mar 2013
      • 2

      #3
      Thanks for reply.I have tried with '\\' but still facing same issue.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        This may be a macro expansion problem where, perhaps a #define or #pragma has been omitted. All I know for certain is that the compiler ran out of code before matching a brace on line 19 of comdef.h.

        Check all of the code preceding comdef.h and verify you haven't got unmatched braces.

        You may need to build with the /Ep switch on to capture the translation unit that was sent to the compiler. Then you should be able delete known pairs of matched braces. Eventully, you will find your culprit.

        Before that, though be sure the code preceding comdef.h has no unmatched braces.

        My money is still on a bad macro expansion. Especailly since a non-metro compile does not present the problem.

        Let me know what happens.

        Comment

        • AAryaman
          New Member
          • Jul 2013
          • 1

          #5
          Hello rajkumaragrawal ,
          Can you please share what fixed the issue for you, ?
          I seem to be stuck at the same issue and do not seem to be making any headway since quitesome time.
          Thanks.

          Comment

          Working...