views:

919

answers:

8

I was contemplating switching to Linux for C++ development, coming from a Windows environment. Is this a bad idea? My workplace uses Windows and Visual Studio for our projects (some C# and java too, but right now I'm only developing in C++). If they decide to put me on a C# project, would development still possible (mono?)? What are the difficulties in this sort of transition?

Would I have a problem working on their projects and vice versa? I read somewhere that there'd be problems with precompiled headers and such (we do use them), and encodings (tabs/spaces, line endings, etc)..

If it's not too hard to do this switch, how do I get started? IDE? vim+make?

Thanks.

By the way, we make MOSTLY windows software..


EDIT: Thanks guys, I guess that makes sense..

+20  A: 

That's a bad idea. I can see at least two reasons :

  • Develop on the same OS you write software for
  • Visual Studio rocks
Edouard A.
While I'd definitely miss the GNU toolchain and the phenomenal awesome power of *nix editors, it doesn't make any sense to not use VS in Windows.
sheepsimulator
Agreed. Totally.
Klaim
True for the VS, as of develop on the same OS... Yeah, and develop stuff for S60 or WM on the cellphone?
vartec
@vartec: the statement is intentionally laconic to drive the point home: for all rules you have exceptions.
Edouard A.
+1 for the first reason. As for VS, it rocks for managed languages but not C++; I use it only for debugging now.
Nemanja Trifunovic
@nemanja : for C++ you need the right plugin
Edouard A.
VS + VisualAssist is usable. But yes, develop Windows on Windows IDE.
Hernán
+8  A: 

Stick with Windows if you're developing for C++ and C#. The Visual Studio debugger is absolutely brilliant, and it seems that most of the Linux IDEs aren't comparable (except Eclipse for Java stuff). Also, the chances are that you'll be using a different compiler if you're on Linux, and that can cause really weird bugs.

Ed Woodcock
Thanks for the advice..
krebstar
I just want to point out that debugging on VS--or anything else for that matter--has nothing on DDD. There's simply no comparison for debugging. Admittedly, it uses an outmoded toolkit (Motif), and doesn't have a "true" Win port (uses Cygwin and an X server).
supercheetah
+2  A: 

Not a very good idea because support for Windows Forms in mono isn't complete yet. Linux c# developers usually use GtkSharp for GUI, which will add another dependency to your app and is quite different from Windows Forms. But GtkSharp isn't bad either. I especially like the packing boxes feature of GTK because it makes my controls (err, widgets) much easier to resize properly and automatically eliminates all screen DPI problems.

But there is also a chance that your existing code might have other dependencies which are not present on Linux, especially unmanaged code called with P/Invoke. If that's the case, doing the development on Linux might be impossible.

RommeDeSerieux
Mkay.. Thanks.. I'm not really a C# developer, just thinking ahead in case they throw something at me.. :)
krebstar
+1  A: 

I have switched to doing web development on linux, here's what I have personally found

In order to do things right that doesn't cause problems in the end (using particular software) I have to have a virtual machine. Wine isn't far enough along to be stable for the software I need

Also for my particular needs, just the whole "System Font" being different has caused numerous scripting issues b/w windows and unix/linux

I am going to be switching back to win. I LOVE LINUX, but in a specialized field where the majority of my clients use windows and IE .... I need to run with what they have... I think this is the smartest for productivity

(personal opinion, not mandate from God)

tim

Tim
Thanks.. We make native apps..
krebstar
+1  A: 

I suggest sticking to windows. Windows is great for windows development. Linux is where you can write cross-platform stuff/ Linux specific stuff (if you wish). I tried Mono for learning C#, it worked for toy examples, but not for some parts of .NET. I switched back to windows. I can't imagine it is a good idea to switch to Linux. I intend no offense, this is just my opinion.

batbrat
No offense taken :) Just wanted some advice from people who've tried it before :) Thanks
krebstar
+4  A: 

Hi, I'm a Mac user (former FreeBSD guy), so I understand your gut feeling. In short: you're going to want to use Visual Studio. It's the best tool there is for your C# projects, period. It's also the best tool for your Windows-centric C++ programming. Even if it wasn't, your testing is going to suffer if you don't run the OS it's going to run on.

On the bright side, always do your development in a virtual machine. Especially on Windows. Use source control and take frequent snapshots of your VM. When you're doing this, it doesn't matter if you run Linux or OS X on your host.

Cheers

Nik

niklassaers-vc
Hi, can you clarify? What kind of VM should I use? I do use source control for myself, because the team doesn't.
krebstar
When you're developing I don't think it matters. I use Paralells at home, VMWare at work, but you could just as well use Sun's VirtualBox. I haven't tried others, but for development I'm sure anything is fine. You're not going to require 3D gaming abilities :-)
niklassaers-vc
+2  A: 

I currently develop on both windows and linux. I find it's pretty useful to compile the same code under those two (or maybe more) platform, as you can find some coding errors thanks to vc++ and some other thanks to gcc. Of course, the most important platform is the one you are developing for. If your application will run on windows, develop it on the same platform and only if you can allocate more resources, try to port it on linux or other. Anyway, it's a good habit to think about portability during develop, it implies to use standard solutions as much as possible

thrantir
+2  A: 

If you're missing a lot of Linux -- and you need to stay on a Windows box to interact with your team AND your work application -- install Cygwin and the GNU Win32 tools.

Michael Paulukonis
I already have some GNUwin32 tools, i found cygwin to be.. quirky, but i haven't used it much anyway, so my opinion doesn't count :) I do like linux though, I try to use it as much as I can on my EEE.. :)
krebstar
It's a lot of hassle to use a different toolchain from other team members. I might even say it's a big waste of time -- though it depends how much time you got ;)I would be strongly inclined to go with the flow, but if you insist on your Unix shell stuff then cygwin and GNUWin32 are both good!
brone