3 ms·
VS is perfect for C++. For C I think I might need a different compiler?
by markus_zhang 6y ago
VS is perfect for C++. For C I think I might need a different compiler?
- AlexeyBrin 6y agoYou can use VS for C just fine on Windows, VS 2019 has full support for C89 and almost complete C99 support. Next iteration of VS 2019 will even add support for _Generic. But, if you want to write portable code to other operating systems, I suggest to build your code with both VS and GCC.
- pjmlp 6y agoTo the extent required by ISO C++, for the rest there is first class support for clang. The latest version of the VS2019 installer already packages clang 10.
- deleted 6y ago[deleted]
- vsgeneric 6y agoDo you have a source for the news on _Generic? I can't find any. If it is true, it would be amazing. So many of my APIs are unwieldy because of Microsoft's refusal to support this one feature.
- AlexeyBrin 6y agoHere you go https://developercommunity.visualstudio.com/idea/443508/msvc-2017-does-not-support-generic-type-generic-ma.html https://developercommunity.visualstudio.com/idea/443508/msvc... Read the comments, it should be available in the next VS2019 update.
- pjmlp 6y agoVisual Studio has first class support for clang, that is Microsoft's answer for those that still want to use C on Windows.
- markus_zhang 6y agothanks I'm using gcc inside of a Ubuntu Vbox but yeah llvm with VS would also be good~
- qalmakka 6y agoInstall llvm. Clang can use all of MSVC headers without breaking compatibility with its ABI, like MinGW does (you can't mix up DLLs built with the MSVC ABI and the MinGW one)
- markus_zhang 6y agoThanks I'm sticking to my Linux vbox at the moment but will try it out whence I move back to Windows.
- qalmakka 6y agoThe only real downside of using MSVC is the mind boggling amount of storage it hogs with libraries you'll never ever use not even once if your goal is to just build simple C++ programs. MinGW might be the only viable approach if you are storage constrained (LLVM/Clang also supports MinGW of course)