Microsoft Continues Porting Visual C++ To Linux (microsoft.com) 159
Long-time Slashdot reader Billly Gates shared some news from Microsoft's Visual C++ blog: Visual Studio 2017 now lets developers write C++ code for Linux desktops, servers, and other devices without an extension, targeting specific architectures, including ARM:
Visual Studio will automatically copy and remotely build your sources and can launch your application with the debugger... Today Visual Studio only supports building remotely on the Linux target machine. It is not limited to specific Linux distros, but we do have dependencies on the presence of some tools. Specifically, we need openssh-server, g++, gdb and gdbserver.
Re: (Score:3, Insightful)
I suppose when you're aiming for first post you don't have too much time to think of anything more constructive.
What, framing the discussion properly is not constructive? See, if Microsoft had ever genuinely reformed, then it would indeed be unconstructive to respond to Microsoft's potentially worthy initiative in such a perjorative way. But Microsoft never did reform. It is unnecessary to look any further than Microsoft's shenanigans with Windows 10 to be sure of that, just the tip of the iceberg. So, actually, "fuck Microsoft" is a lot more constructive than you seem to believe: it helps keeps us alert to evil inte
Re: (Score:2)
I suppose when you're aiming for first post you don't have too much time to think of anything more constructive.
What, framing the discussion properly is not constructive? See, if Microsoft had ever genuinely reformed, then it would indeed be unconstructive to respond to Microsoft's potentially worthy initiative in such a perjorative way. But Microsoft never did reform. It is unnecessary to look any further than Microsoft's shenanigans with Windows 10 to be sure of that, just the tip of the iceberg. So, actually, "fuck Microsoft" is a lot more constructive than you seem to believe: it helps keeps us alert to evil intent, should there be any, irrespective of the possibility that there might really be none in this case. Not that I have the slightest interest in adopting Microsoft's development platform. I am perfectly happy and productive with the one I have now, the development of which is controlled by people I trust.
You Microsofties would be better advised to improve your behavior instead of trying to downmod the richly earned Slashdot cricticism.
Re: First (Score:4, Informative)
Re: (Score:2)
Personally I think "Fuck microsoft" perfectly sums it up. They spent decades attacking FOSS and hindering progress to line their own pockets. So yeah, fuck them.
I second that. In that spirit, fuck Microsoft.
Microsoft, can you fix Linux? (Score:1)
I never thought I'd say this, but Microsoft may be the only organization out there that can save Linux from itself.
I was a long time Linux user. I started with Yggdrasil, before moving on to other distros over the years. I've seen Linux grow from almost nothing into a superb desktop and server OS, but I've also witnessed its steep decline since then.
Linux distros peaked around 2010. Its reliability was great. It was finally easy to install. It had excellent hardware support. It had good desktop environments
Re:Microsoft, can you fix Linux? (Score:4, Interesting)
You do realize that most of the complaints you have are basically moving a Linux desktop more toward what MS has done with Windows desktop. PulseAudio bears no small resemblence to Windows Vista+ audio stack (in terms of architecture). systemd similarly resembles the way microsoft services work, journald resembles event viewer design, networkmanager is pretty much the same way Windows does network management, dconf acts a lot like the registry.
If anything, I'd say MS is worse at many of these. As much as I object to journald, event viewer is worse. systemd does make some things more complex, but not nearly so much as the way microsoft handles services. dconf is at least more straightforward and more powerful than windows registry.
Re: (Score:2, Offtopic)
Re: (Score:2)
Re: (Score:3)
Visual Studio was always a MAJOR advantage of Windows
Always? No. Vance Petree said, "I'd crawl over an acre of 'Visual This++' and 'Integrated Development That' to get to gcc, Emacs, and gdb. Thank you." Until Visual Studio 2005, the emacs/gcc/gdb stack was clearly better (once you got over the learning curve). It was not even a question, visual studio sucked.
Now Visual Studio is definitely an advantage of Windows.......but only for people who prefer Visual Studio. For people who have preference for certain tools, like the Valgrind suite, Linux is still b
Re: (Score:2)
Re: (Score:2)
You are absolutely out of your mind
What an erudite, informative, and intelligent thing to say. You are so convincing. I expect nothing less from Windows lovers.
Re: (Score:2)
you should just have replied with proof about vi's autocomplete.
Here you go [bfy.tw], but if you're having trouble using Google I can't imagine the confusion autocomplete will give you. Maybe you need to put down your beer in the cupholder on your computer and clear your mind.
Re: (Score:2)
Yes but did he say that because he thought Emacs, gcc and gdb were a better developer environment or be3cause he had a thing against Microsoft? I suspect it was the latter because Visual Studio is way better than using this three tools in isolation.
Re: (Score:2)
Re: (Score:2)
Are you familiar with emacs? It's an IDE by itself, if set up to be one. (The old joke is that it's a great OS shell, but needs a new editor. Since then, vim bindings have come to emacs, so that's no longer true.)
Re: (Score:2)
So Visual Studio is only an advantage to people who prefer Visual Studio, and yet your proof that it wasn't a major advantage of Windows before 2005 was because one person didn't prefer Visual Studio.
I didn't think this was controversial lol. I don't know anyone who understood both Visual Studio and the unix stack who thought that VS was better before 2005.
Even setting up project files in the GUI was painful (where is that compile option I want? How do I link to a shared library?). With gcc it was pretty obvious where the compile option was, and where you had to put it in the Makefile. Of course, if you didn't understand makefiles, that would seem confusing to you, but in that case you're one of the
Re: (Score:2)
I was using Visual Studio in 1998. I was also using gcc and gdb (but not Emacs). Visual Studio was a vastly better experience.
Re: (Score:2)
Re: (Score:2)
Lovely argument. Anyone who prefers Visual Studio does so because they are stupid.
No, no. But anyone who claims they prefer Visual Studio without having an understanding of the alternatives, has absolutely no basis for judgement. They merely prefer the only thing they know.
Re: (Score:2)
>> Visual Studio was always a MAJOR advantage of Windows. ... In your opinion....
In mine, there are already just as good if not better equivalents under Linux for free.
Re: (Score:1)
Re: (Score:1, Offtopic)
You do realize that most of the complaints you have are basically moving a Linux desktop more toward what MS has done with Windows desktop
If that's what you think, then use KDE, it's smoother, more flexible and more sensibly organized than Microsoft's Windows GUI. And doesn't lean on a horrible centralized configuration hack like the dconf, gconf or registry monstrosities. A lot of the Microsoft envy that Gnome devs suffer from is just pure brain damage, as evidenced by Gnome development falling off the rails multiple times. Sure, Microsoft had some good ideas worth learning from, but a lot of them, like the registry, are pure crap, apparentl
Re: (Score:2)
You do realize that most of the complaints you have are basically moving a Linux desktop more toward what MS has done with Windows desktop
If that's what you think, then use KDE, it's smoother, more flexible and more sensibly organized than Microsoft's Windows GUI. And doesn't lean on a horrible centralized configuration hack like the dconf, gconf or registry monstrosities. A lot of the Microsoft envy that Gnome devs suffer from is just pure brain damage, as evidenced by Gnome development falling off the rails multiple times. Sure, Microsoft had some good ideas worth learning from, but a lot of them, like the registry, are pure crap, apparently designed mainly to maximize the suffering of long suffering Windows victims.
Microsoft employee with mod points posts "-1, Disagree"
Re: (Score:2)
I never thought I'd say this, but Microsoft may be the only organization out there that can save Linux from itself.
I think that Linux is doing well enough without Microsoft making their own distribution. Yes, Linux has had some problems with some aspects, but so has Microsoft. Just look at the changes that it made with Windows 8 and how they have had to backtrack some of their ideas with Windows 10. I am also wary about the direction that MacOS is going too, so there is no knight in shining armour out there to save the day for us.
But it is still possible for most people to find a distro or OS that suits their needs. If
Re: (Score:3)
Are you a troll? Or, perhaps, one of James Plamondon's "Linux technical evangelists", a.k.a. digital terrorists, because of the postings they make on various computer or technical websites. Joe Baar wrote well of them with his article "SLIME".
I've been using Linux since May of 1998 with RH 5.0. I've experimented with lots of distros and spent time with Mandrake, Mandriva, PCLinuxOS, openSUSE and a few others. For its time RH 5.0 was marvelous, compared to Win95, and so it has been. The current Linux d
Pottering has pictures of someone at RH (Score:2)
Most of the above are foisted on Linux community by that asswipe, and he somehow gets RedHat to go along.
Re: (Score:2)
Re: (Score:3)
I think they need to stop charging for VS otherwise they may get .. well eclipsed.
They have had free versions of Visual Studio for a some years now, and according to the comments at the bottom of the article this Linux remote compilation works with the community (free) version too.
Re: (Score:2)
The Linux functionality is available in Visual Studio Community Edition, which is free (subject to the usual jokes about "provided you don't value your soul...)
Sounds like VisualGDB... (Score:3)
...I wonder if they licensed any of that technology. I bought a copy of VisualGDB a few years ago and it was slick as hell. I had to port a bootloader written in C that was Windows-only, turning it into a simple command-line program on Linux. It was easy as using a native toolchain (easier, in fact, if you have Visual Studio muscle-memory), and so seamless that it was easy to forget that this was all over-the-wire interaction between a Linux box and Windows.
In my case I was porting it over to a Raspberry Pi to prototype a portable diagnostic device for a hardware project. Came out swimmingly, was one of the highest-impact things I did for them. I was starting with all Windows code, both C and C#. Between VisualGDB and Mono, the porting was extremely easy to do.
Re: (Score:2)
The debugger code is open source:
https://github.com/Microsoft/M... [github.com]
Re: (Score:2)
Well, it's might introduce latency, or it might not, it really does depend on exactly how it's all setup.
I can imagine VS working on a shared filesystem, so that sshing and invoking the build (probably via cmake as cmake support is new in VS2017) is pretty quick and painless if the machine is nearby. If it runs the build, and integrates build/test results with the IDE, then it's going to be a performance win for some people who are very VS centric, and who are developing cross platform libraries.
Anything th
Re: (Score:3, Interesting)
Each additional platform takes much extra effort
This, exactly.
Since I'm developing for a Linux platform, I already have one of these here. So explain again why I have to drag another platform (Windows with Visual C++) into my toolchain when perfectly good IDEs are available for the native Linux environment.
Re: (Score:3)
This, exactly.
Since I'm developing for a Linux platform, I already have one of these here. So explain again why I have to drag another platform (Windows with Visual C++) into my toolchain when perfectly good IDEs are available for the native Linux environment.
Explain who, exactly, is putting a gun to your head to switch to a different tool chain when what you are using now is perfectly fine?
Re: (Score:2)
So explain again why I have to drag another platform (Windows with Visual C++) into my toolchain when perfectly good IDEs are available for the native Linux environment.
That is a phenomenally stupid question. Do you ask this sort of thing every time a new feature is added to some software that you don't use? Because I hate to tell you this but the overwhelming ratio of software that you currently use and that which you don't have installed means you will spend the majority of your time complaining about improvements that don't matter to you.
For people who use Visual Studio, this feature adds an extra platform that can be targeted. It allows people to use the IDE with which
Re: (Score:2)
You don't.
Now consider the developers who, like you, have been asking that very question but, unlike you, have until now been predominantly Windows and Visual Studio based.
Your argument works perfectly the other way round - just because it exists doesnt mean its aimed at you...
Re: (Score:2)
Please keep your closed mindedness to yourself.
Re: (Score:2)
If you only care about Linux, you're not the target audience.
Re: Sounds clunky (Score:2)
Depending on exactly what you are doing, you could run Linux in a VM on the same machine.
Re: Sounds clunky (Score:2)
I guess you could also go the other way, and use Linux as the host machine, and put Windows in the VM.
Re: (Score:2)
Remote compilation isn't exactly unheard of, nor is it unusual.
For example, MonoGame developers on MacOS and Linux can't build .fx format effects (shaders) on their own systems because the fxb.exe tool required is Windows-only and also requires the XNA Framework installed on the Windows machine doing the work. This led to solutions like InfinitespaceStudios in the UK hosting an Azure service for all the non-Windows shader writers to use, even supplying a Nuget package to reference from the Content Pipeline
Yet another step forward (Score:2)
Re: (Score:2)
We can only hope.
Re: (Score:2)
Re: (Score:2)
First the Mac was the crown jewel,
Seriously? It was just a toy until 2001.
Re: (Score:2)
No it was not "just a toy", it was used for a lot of serious work and was the primary contender to MS Windows - WHICH IS WHAT THIS SUB-THREAD WAS ABOUT!
need openssh-server, g++, gdb and gdbserver. (Score:2, Troll)
So basically they're just porting the IDE.
Remind me again why I'd spend money on this instead of just freely using eclipse or netbeans or something?
Re:need openssh-server, g++, gdb and gdbserver. (Score:4, Informative)
So basically they're just porting the IDE.
No. The IDE still runs under Windows. This extension uses SSH to run the compiler on a remote Linux system.
Remind me again why I'd spend money on this instead of just freely using eclipse or netbeans or something?
You don't have to spend money on Visual Studio. This extension works with the free Community edition as well as the paid version. But if you don't currently use Visual Studio then you don't need change just for this feature. It is only really useful if you also want to use the software to develop Windows and mobile applications.
Re: (Score:2)
>> No. The IDE still runs under Windows. This extension uses SSH to run the compiler on a remote Linux system.
OK well that just makes my point even more, especially given the compiler isn't even Microsoft's its g++. I feel like I'm totally missing something here. Or maybe there's nothing to miss?
Re: (Score:2)
You're missing it because you're considering it from your perspective. There are many C++ developers out there for whom the primary platform is Windows, but they increasingly need to also target OS X, Linux, Android etc. This makes it easy for them to continue using Visual Studio on their machines, while building, running and debugging code on those other systems.
Another feature like that is Windows Subsystem for Linux. You wouldn't care about it if you live in Linux land entirely, but if you have Windows c
Re: (Score:2)
Yeah you're right I haven't had anything to do with the Microsoft/Windows culture for decades (by choice), so I guess I'm just not gonna be able to mentally put myself in their shoes.
Thanks for the info about VSCode though. I'll check it out.
porting...what exactly? to what? WINE? VS CODE? (Score:2)
Are they porting compiler and build system or the entire IDE?
If they are porting IDE than with what? Isn't VS IDE done with WPF these days? Perhaps they target...ehem...WINE?
Or are they rebuilding it around Visual Studio Code?
Re: (Score:3)
Are they porting compiler and build system or the entire IDE?
If they are porting IDE than with what? Isn't VS IDE done with WPF these days? Perhaps they target...ehem...WINE?
Or are they rebuilding it around Visual Studio Code?
As usual, the Slashdot article title is misleading. What they are describing is not really the porting of Visual Studio to Linux, although MS has been hinting at that for awhile. What the article is describing is the integration of the IDE (running on Windows) with a Linux tool chain (running on Linux). Which per my earlier post, has been possible before with third-party Visual Studio add-ons. For some use cases it is a win.
If you are not already a Visual Studio user and are developing exclusively for L
clang is a better target (Score:5, Interesting)
If I were going to switch to anything other than gcc (or support anything in addition to it), I would first go for clang and then maybe icc. I can't imagine what value vc++ would add over those.
gcc's warning/error messages are pretty awful and I really like that clangs almost always point me precisely to where the problem is, as opposed to where the problem finally made the compiler lose its mind. Does vcc++ improve on clang in that respect? If it does, I could supporting it as a build target for automated builds to get the nice diagnostics (I do this now for a project with clang), but I can't imagine it would be worthwhile for something that gets deployed.
icc is nice if you are on Intel hardware and want the sooper-dooper extra special optimizations, but that is about it.
Re: (Score:3)
If you had gone as far as reading the summary, you might have noticed it doesn't actually use the Windows compiler on Linux. Instead it uses gcc.
Re: (Score:2)
Re: (Score:2)
It does use gcc.
Re: (Score:1)
bits of clang have been showing up in Visual Studio for a while now.
Clang with Microsoft CodeGen in VS 2015 Update 1 [microsoft.com]
Clang is the C-LANGuage family front end for LLVM compiler. Microsoft is using it the same way: clang parses your files, but Microsoft CodeGen finishes the job.
This means that source/syntax will be the same between VS and Linux, but on window's you'll get microsoft's optimizations instead of LLVM's.
Re: (Score:1)
> I can't imagine what value vc++ would add over those.
The wonderful VS IDE for debugging, as opposed to the piece of shit retro crap that is GDB? I hate Windows and all it stands for, but let's not kid outselves that it's time to flush that dated bollocks down the toilet and do some sensible debugging.
Re: (Score:1)
I agree that clang++ is better at the moment, I prefer it over g++ myself.
However, as I understand it gcc has had a resurgence in effort and has caught up recently in some metrics (citation probably needed, whatever), and gcc could concievably overtake clang in the future.
Microsoft wouldn't be wise to target a compiler purely based on which was superior at this point in time, rather they should base it on the compiler project's expected momentum in the next 5-10 years.
Also note that they had already targete
Re: (Score:2)
I use clang for bonus warnings, but my program won't run with clang because I need -fnon-call-exceptions. Yeah, I know throwing exceptions from signal handlers is a bad idea ("what if the exception is thrown inside a noexcept function?"). But who cares if it crashes when it was going to crash anyway. Also, I check null pointers a bit more carefully in noexcept. Being able to catch and log NPEs helps tremendously when you're porting from a GC'd language, so the benefit outweighs all the downsides.
FWIW a more common way to do this is by letting it crash and leaving a core file, then getting a stack trace of the core. The advantage of this is you can examine the state of all variables at the time of the crash, anywhere on the stack, at your leisure (ulimit -c unlimited enables core dumps).
If you want to set it up print the stack into your log automatically, you can use a command like this:
echo "bt" | lldb -c corefile; rm corefile
Obviously be careful with the rm command, and another option is t
Yet another repackaged GCC then? (Score:3)
Maybe I'm the one with the problem. Given how easy it is to sell people something they already have for free (Dropbox, Slack, GotomyPC, etc), you'd think I'd get on the bandwagon and go into business selling people the ability to click their mouse or type Latin characters on their keyboards.
Is GDB as good as the VS Debugger? (Score:1)
I'm more than curious.
I find the VS debugger to be simply wonderful; as do others. In my institution, a lot of developers (mostly Ph.D. students) who have to target Linux, choose to run VS in a VM and develop/debug under Windows before recompiling under Linux. This is so popular that some have automated the process somewhat and perform Linux daily builds (only).
I've used GDB in the past, but wasn't impressed: so I'm wondering why, if the VS debugger under Windows is so good, why don't more people don't do
Re: (Score:2)
GDB is very, very good. If you were "not impressed", then you did not get how to use it. One way to make it more "caveman" (people that cannot express themselves in written form) compatible is to use DDD.
Re: (Score:2)
GDB is very, very good. If you were "not impressed", then you did not get how to use it.
What are your favorite (lesser known) features of GDB? I'm not saying you're wrong, just want to improve my knowledge.
Re: (Score:2)
My experience with GDB is quite out of date. I did a lot of realtime Linux C++ development for Alcatel Space. I did exactly what the GP mentioned: develop and debug core infrastructure on windows using VS, and then port to Linux.
Keep in mind, I was used to platform infrastructure development on both Windows and Linux, and equally at ease with Visual Studio and VIM. In fact I much preferred VIM and G++ at that time.
The reason I chose to use visual studio to implement the first infrastructure builds, was that
Re: (Score:2)
Depending on skill and task, a console debugger is very much state-of-the-art. I used DDD for a while, but I found that I do not need it and that, in fact, is slows me down. Of course, I only use a debugger for really hard things, for the rest I have not needed one in decades.
Re: (Score:2)
This does not replace gdb. It takes gdb - which is an extremely powerful, but also rather low-level debugger - and provides a high-level, simpler, but more convenient UI around it. Under the hood, it still talks to gdb.
This is similar to how VC++ native debugger relates to dbg/windbg. The former is more high-level and easier to use, but the latter is more powerful and lets you do crazy things.
Re: (Score:2)
there are very good IDEs on linux too. They have gdb integration, syntax predicting thru clang, etc. I use Codelite's GUI for gdb.
And they are, by and large, in the way.
Not porting to Linux, targeting Linux. (Score:3)
The title here is extremely deceptive because MSVC isn't being ported to Linux at all. What they are doing is creating a way to target Linux. It's still just development on a Windows desktop, not development on a Linux desktop.
Re: (Score:2)
>> It's still just development on a Windows desktop, not development on a Linux desktop.
But whats the point then? I mean Linux already has several better IDEs than Visual Studio.
Re: (Score:2)
exactly.
So I can now use g++ and gdb with a bad UI? (Score:2)
Sorry, but no. I will stay with what has worked well for a long time.
MS C++/Kylix (Score:1)
Good move (Score:2)
I have been using the VisualGDB product for linux development. If this works as good or better, I'm happy
I have spent lots of time trying to find a decent IDE for linux, but none of the available options comes even close to Visual Studio
Yeah, if I have no options, I can get work done on any system, but a good IDE makes everything easier
Re: (Score:2)
>> but none of the available options comes even close to Visual Studio
Of course they do. What you're really saying is that you personally don't want to spend the time/effort to learn something new.
At least in my opinion both Eclipse and Netbeans are better than Visual Studio, especially since it still wont run natively on linux, To develop linux code with Visual Studio, you need a windows PC (running Visuaul studio) linked to a Linux PC that does the compiling/running/debugging remotely. You'd have
Extend... (Score:1)
... and can launch your application ... (Score:2)
So, they've got a decent X server available for the Windows platform bundled with that?
Re: (Score:2)
Re: (Score:1)
"What makes you think that doesn't happen now?"
Why would I of all people bring it up if I weren't already aware that this is exactly what is happening and have had it happen to myself (though not via Microsoft?)
Re:Remote only (Score:5, Informative)
You do realise that "remote" in this instance is you own Linux machine, right? Not a closed build server owned by Microsoft - you are asked for connection information to a Linux machine so VS can copy sources, build, run and connect the debugger.
A 30 second scan of the link in the summary would have shown that up, but that might have held up your shit posting...
Re: (Score:2)
You do realise that "remote" in this instance is you own Linux machine, right? Not a closed build server owned by Microsoft - you are asked for connection information to a Linux machine so VS can copy sources, build, run and connect the debugger.
While I'm not asserting that Microsoft is sending anything home in this case, that actually wouldn't be an impediment. They'd just send the data back from your Windows machine, which is receiving the debugging information.
Re: (Score:2)
I'm not saying it was an impediment, just that the entire premise of the argument was bollocks - the Linux machine in question is one you supply.
Re: (Score:2)
I'm not saying it was an impediment, just that the entire premise of the argument was bollocks - the Linux machine in question is one you supply.
Right, and then the data in question is transferred back through a Windows machine, which you can't trust. It doesn't matter who supplies the Linux machine. You are opening a conduit into it from your Windows machine.
Re: (Score:2)
Oh wow, how original, never heard that one before, give yourself a much needed pat on the back and immediately consider yourself a top tier comedian...
Re: (Score:2)
At least I chose one.
Re: (Score:1)
As if Visual Studio isn't sending shit out to Microsoft. You trust way too much, oh coward that can't be bothered to identify themselves because they're WRONG.
Re: (Score:2)
VS does send certain metrics to Microsoft, this has been the case for ages, and its not hidden. But there's absolutely no evidence that VS is sending the sort of thing that you are alleging, so unless you provide some...
Remote building and debugging has been part of VS for certain targets for ages, this is nothing new. And I'm both identifying myself and calling you out. How about that?
Re: (Score:2)
VS does send certain metrics to Microsoft...
However much it is, it's too much. Rejected.
Re: (Score:2)
Basic (optional) telemetry to help improve the product is a terrible thing.
Telemetry that is opt-out instead of opt-in is bad. Telemetry with no opt-out is worse. Spyware under the guise of product improvement is the worst. The latter is classic Microsoft. Rejected.
Re: (Score:2)
Considering that all the compiling work still happens using whatever (presumably trusted) version of GCC and Binutils is running on the Linux box (or VM) you are using, I dont think that particular risk applies here.