Code Monkey home page Code Monkey logo

Comments (4)

jpakkane avatar jpakkane commented on August 17, 2024

Which version of Visual Studio is this? Because the last time I tested this on VS2010 (the only version I have) it worked without needing to include the object file.

from meson.

jpakkane avatar jpakkane commented on August 17, 2024

I checked and VS2010 definitely does not require that you link in the object file. It does not harm either, so I changed it to always add it in. Can you test whether current trunk works for you?

from meson.

kterhorst avatar kterhorst commented on August 17, 2024

Yeah, it works for me now. The cpp pch sample which previously failed to compile also works now but I get the warning:

ninja
[1/3] Precompiling header ..\src\pch/prog_pch.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xlocale(337) : wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled. S
pecify /EHsc
[3/3] Linking target prog.exe

So I would suggest to add /EHsc by default.

By the way, meson generates the sanitycheck*.obj outside the build directory. It would be cleaner to put that file in the build directory or delete it.

from meson.

jpakkane avatar jpakkane commented on August 17, 2024

Thanks for testing. I fixed the sanitycheck one just now.

As far as /EHsc goes, it seems to me that people might want to compile with different exception types so putting that in by default does not seem right (as you can't unset the core flags set by Meson). Adding this in by yourself is a one-liner (or three lines if you want to wrap it in an if clause):

add_global_arguments('/EHsc', language : 'cpp')

I'm closing this issue as fixed now. If you have more to say about the exception argument, please open a new issue.

Thanks,

from meson.

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.