CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26

Thread: Puzzling error from std::stringstream in VS2019

  1. #16
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,425

    Re: Puzzling error from std::stringstream in VS2019

    Just for interest/info - we stopped creating .dll's several years ago. We also stopped splitting classes into header/implementation files. Everything is now in .hpp files that are included as needed (with functions marked in-line etc).

    No problems - no worries about mixing from different compiles etc. With current 'smart' compilers no discernible slowdown in compile time. No use of pre-compiled headers. No complex setup etc. The only thing that needs to be set is "Additional Include Directories" to the name of the parent folder for the .hpp files. Simples!

    PS We've looking into C+20 modules - but so far not impressed and seem more bother than they are worth for own modules. Possible OK for the std et al.
    Last edited by 2kaud; February 20th, 2021 at 08:20 AM.
    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++20 Compiler: Microsoft VS2019 (16.8.6)

  2. #17
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    Quote Originally Posted by John E View Post
    Adding folders to the VS path used to be childishly simple in earlier versions of MSVC - but I'm blowed if I can find a way to do it with VS2019.
    If I right-click a particular project and then:- Properties->VC++ Directories->Include Directories I can then select Edit->Macros which shows me the various macros such as $(VC_IncludePath) and $(VC_LibraryPath_x64) etc. However, I can't find any way to edit them.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  3. #18
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    I've just remembered that I once found on my C: drive a file called Microsoft.Cpp.x64.user.props which allowed me to add extra include folders / library folders etc. I just tried a quick edit here and it looks like things are now compiling and linking again. There are too many libs to build tonight so I'll leave it now until tomorrow.

    But surely it shouldn't be this difficult ...there must be an easier way to do this than by tracking down obscure files and having to edit them manually.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  4. #19
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    Quote Originally Posted by 2kaud View Post
    PS Has this fixed the previous error with the debug build with the missing subfolder? [ https://forums.codeguru.com/showthre...th-Debug-build ]
    Up early this morning to get everything compiled again but the bad news is that it hasn't fixed things. I can't understand why the debugger insists on tracing into files (from a toolset which isn't even installed on my system... )
    "A problem well stated is a problem half solved. - Charles F. Kettering

  5. #20
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,425

    Re: Puzzling error from std::stringstream in VS2019

    Have you tried creating a completly new solution with just the existing source files? IMO there's a solution file used in debugging that contains a wrong file reference. Try doing a file search for that folder name.

    Has the stringstream error been fixed?
    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++20 Compiler: Microsoft VS2019 (16.8.6)

  6. #21
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    No - the stringstream issue didn't get fixed either. I've just installed VS2019 on a different system so I'll know in a few days if that gives me the same issues. Just as an exercise though...

    Could you maybe add the following line to any of your source files:-

    Code:
    LoadLibrary("whatever")
    and then run it in Debug mode and see if you can trace into LoadLibrary. IIRC LoadLibrary() is in kernel32.dll so I'm just wondering if that's the one that's trying to access the older toolset (if that's the case, you probably won't be able to trace into it either).

    [Edit...] I just built a very simple program (using the newly installed VS2019) and on that system, it won't let me trace into Loadlibrary() - however, it doesn't give me any message dialog, so I assume it's correctly using 14.28.29333
    Last edited by John E; February 21st, 2021 at 07:19 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  7. #22
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    Quote Originally Posted by John E View Post
    run it in Debug mode and see if you can trace into LoadLibrary
    I tried some more experiments yesterday with 2 x older compilers (VS2005 and VS2015) as well as my 2 x copies of VS2019 (each on different machines). In Debug mode, the older compilers let me trace into most library functions (open() / printf() etc). There are one or two exceptions such as LoadLibrary() / puts() and a few others - but so far, for either of my VS2019 installations, I haven't found a single library function that I can trace into using F11. Maybe this is something which just doesn't work any more in VS2019
    "A problem well stated is a problem half solved. - Charles F. Kettering

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

    Re: Puzzling error from std::stringstream in VS2019

    Quote Originally Posted by John E View Post
    ... I haven't found a single library function that I can trace into using F11. Maybe this is something which just doesn't work any more in VS2019
    Yeah! I also already saw the similar behavior of some C-Runtime functions.
    Victor Nijegorodov

  9. #24
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,695

    Re: Puzzling error from std::stringstream in VS2019

    Something just occurred to me... are you both using the Community Edition or one of the paid-for versions? Maybe it's just a disabled feature in the Community version?
    "A problem well stated is a problem half solved. - Charles F. Kettering

  10. #25
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,928

    Re: Puzzling error from std::stringstream in VS2019

    I use the Enterprise.
    Microsoft Visual Studio Enterprise 2019
    Version 16.8.4
    Victor Nijegorodov

  11. #26
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,425

    Re: Puzzling error from std::stringstream in VS2019

    For differences between the various versions of VS2019, see https://www.tektutorialshub.com/visu...vs-enterprise/
    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++20 Compiler: Microsoft VS2019 (16.8.6)

Page 2 of 2 FirstFirst 12

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)