CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2020
    Posts
    46

    Unable to compile

    hello I have a question about the compilation

    I compiled the attached code without any problem up to two/three updates ago, after the last two or three updates if I try to compile the code again I got many errors and the exe is not produced.

    Anyone can give me some help about it?

    The latest version I use is:

    Microsoft Visual Studio Community 2019
    Versione 16.10.3
    VisualStudio.16.Release/16.10.3+31424.327
    Microsoft .NET Framework
    Versione 4.8.04084

    Edizione installata: Community
    Visual C++ 2019 00435-60000-00000-AA437
    Microsoft Visual C++ 2019
    Adattatore di test per Boost.Test 1.0
    ASP.NET and Web Tools 2019 16.10.526.50910
    Estensione IntelliCode 1.0
    Gestione pacchetti NuGet 5.10.0
    Microsoft JVM Debugger 1.0
    Microsoft MI-Based Debugger 1.0
    Pacchetto di Microsoft Visual Studio VC 1.0
    Pacchetto host dell'adattatore di debug di Visual Studio Code 1.0
    Procedure guidate di Microsoft Visual C++ 1.0
    ProjectServicesPackage Extension 1.0
    Strumenti C# 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416
    Strumenti di Visual Basic 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416
    Strumenti TypeScript 16.0.30429.2002
    Test Adapter for Google Test 1.0
    Visual Studio Tools per CMake 1.0


    thank you
    Attached Files Attached Files

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Unable to compile

    Quote Originally Posted by RIC63 View Post
    hello I have a question about the compilation

    I compiled the attached code without any problem up to two/three updates ago, after the last two or three updates if I try to compile the code again I got many errors and the exe is not produced.

    Anyone can give me some help about it?

    The latest version I use is:

    Microsoft Visual Studio Community 2019
    Versione 16.10.3
    VisualStudio.16.Release/16.10.3+31424.327
    Microsoft .NET Framework
    Versione 4.8.04084

    Edizione installata: Community
    Visual C++ 2019 00435-60000-00000-AA437
    Microsoft Visual C++ 2019
    Adattatore di test per Boost.Test 1.0
    ASP.NET and Web Tools 2019 16.10.526.50910
    Estensione IntelliCode 1.0
    Gestione pacchetti NuGet 5.10.0
    Microsoft JVM Debugger 1.0
    Microsoft MI-Based Debugger 1.0
    Pacchetto di Microsoft Visual Studio VC 1.0
    Pacchetto host dell'adattatore di debug di Visual Studio Code 1.0
    Procedure guidate di Microsoft Visual C++ 1.0
    ProjectServicesPackage Extension 1.0
    Strumenti C# 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416
    Strumenti di Visual Basic 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416
    Strumenti TypeScript 16.0.30429.2002
    Test Adapter for Google Test 1.0
    Visual Studio Tools per CMake 1.0


    thank you
    What kind of errors do you get?
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2020
    Posts
    46

    Re: Unable to compile

    Morning VictorN

    in the attached image 'Error_1.jpg' only some of the errors I receive ... is it possible that some component must be installed that is not currently installed? see 'Installed_Modules.jpg'

    thank you for your support
    Attached Images Attached Images   

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Unable to compile

    Sorry, but I can't see anything on the picture you've attached. It's resolution does not allow it.
    Could you copy/paste the error list from the Output window?
    Victor Nijegorodov

  5. #5
    Join Date
    Feb 2020
    Posts
    46

    Re: Unable to compile

    sure, I have attached the list of errors
    Attached Files Attached Files

  6. #6
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Unable to compile

    The first error is L8 - which if the lines match your previous attachment is

    Code:
    #import "C:\\Program Files\\Microsoft Office\\Office14\excel.exe" \		// OK on Office PC ....MsOffice in Home PC
    and the error is
    Code:
    (8,67): error C2017: illegal escape sequence
    which means that at position 67 there's some sequence of chars which the compiler doesn't like.

    Now at pos 67 there is the line delimiter \.

    From MS "The backslash character (\) is a line-continuation character when it's placed at the end of a line."

    but there are chars after the \ !! You can't add chars (even a comment) after the line continuation char.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  7. #7
    Join Date
    Feb 2020
    Posts
    46

    Re: Unable to compile

    Now works

    I tried to make some changes to the code myself but obviously my knowledge is insufficient to fall into such trivial errors
    .. I have to re-evaluate my approach to the forum

    I apologize for my question and thank you again for your kindness

    Sincerely

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Unable to compile

    Quote Originally Posted by RIC63 View Post
    Now works

    I tried to make some changes to the code myself but obviously my knowledge is insufficient to fall into such trivial errors
    .. I have to re-evaluate my approach to the forum

    I apologize for my question and thank you again for your kindness

    Sincerely
    Did you remove the trailing backslash in this
    Code:
    #import "C:\\Program Files\\Microsoft Office\\Office14\excel.exe" \		// OK on Office PC ....MsOffice in Home PC
    #import directive?
    Victor Nijegorodov

  9. #9
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Unable to compile

    He should have removed everything on that line after the \ but keeping the \

    When \ is used as the line continuation char as it is here, there can't be any chars after it (other than \n) - including spaces or comments.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  10. #10
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Unable to compile

    [Split into two posts as different issues. See https://forums.codeguru.com/showthre...ble-to-compile ]
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  11. #11
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Unable to compile

    But also note P2223 for C++23 which introduces a breaking change to MS C++. http://www.open-std.org/jtc1/sc22/wg...21/p2223r2.pdf
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured