GithubHelp home page GithubHelp logo

Comments (6)

phlptp avatar phlptp commented on August 28, 2024

I will take a look. Is this on the latest visual studio version? I had some trouble in the past with some breaking changes in C++20 and U8 strings, so this might be related to that.

from units.

SimonHeybrock avatar SimonHeybrock commented on August 28, 2024

We are using the windows-latest CI image from Azure: https://github.com/scipp/scipp/blob/master/.azure-pipelines/pull_request.yml#L183. I am not sure how often this is updated, but right now versions are:

2021-02-08T14:11:22.5461743Z + cmake -G 'Visual Studio 16 2019' -A x64 -DCMAKE_CXX_STANDARD=20 -DPYTHON_EXECUTABLE=/c/Miniconda/envs/scipp-developer/python '-DCMAKE_INSTALL_PREFIX=D:\a\1\a/install' -DCMAKE_BUILD_TYPE=Release 'D:\a\1\s'
2021-02-08T14:11:48.4399026Z -- The C compiler identification is MSVC 19.28.29336.0
2021-02-08T14:11:50.6122933Z -- The CXX compiler identification is MSVC 19.28.29336.0

from units.

phlptp avatar phlptp commented on August 28, 2024

Are you building with the Units CMAKE or just including the code in your library?
If you are just including the code you will need to include the /Zc:char8_t- flag on visual studio when compiling with C++20.
The CMAKE stuff includes that but I should add a note to the docs if just adding the code.

For other compilers you would need -fno-char8_t

from units.

SimonHeybrock avatar SimonHeybrock commented on August 28, 2024

I am using this via cmake add_subdirectory, so if this is set by the CMakeLists.txt of Units, I suppose it should be handled correctly without manual intervention?

from units.

phlptp avatar phlptp commented on August 28, 2024

Yeah it should be, if you want to check something try adding those flags to your project and see if it compiles. I might have put them in the wrong spot, or something that doesn't propagate under add_subdirectory

from units.

SimonHeybrock avatar SimonHeybrock commented on August 28, 2024

I can confirm, this is fixed by #125. Thanks a lot for the quick response!

from units.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.