views:

1045

answers:

8

I know there are many IDE related questions already answered on StackOverflow, but I have a strange request.

I'm looking for a C++ IDE for Windows that is designed with Linux as a destination compile point. I just want to use it for syntax highlight, code completion, basic error detection, etc. In the end all code will be sftped over to a Linux server for compiling and debugging.

So what would you recommend as an Windows IDE designed to compile for Linux?

+4  A: 

You can use any IDE you like, all you have to do is re-compile your code for linux. However your best bet is to stick with standard template libraries. If you start using header files like 'windows.h' then you can get into trouble.

EDIT: Here are some nice IDE's + links.

My personal favorite IDE is Qt Creator. Now yes I am a Qt (hobby) programmer, but it's all cross platform. Also you might try Netbeans I really like it but it's got it's drawbacks. It's slow (written in java), it takes a little time to set it up for C++ because it's primarily for java. But all in all it's not that half bad.

Lucas McCoy
I spent the last 3 hours trying to get NetBeans to work correctly. I'll try QT Creator now!
St. John Johnson
+2  A: 

I think you might find very quickly that what you describe becomes really, really annoying in practice. You might find it easier to use some kind of linux virtual machine on your Windows desktop, if you are absolutely forced to develop on Windows. Or look into having a second dedicated-linux machine, linked together with Synergy, perhaps.

Of course, text editors like Vim and Emacs run fine on Windows. Other than that, I'd suggest Eclipse with the C++ plugin might be the go and worth looking at.

EDIT: I've also heard good things about Code::Blocks and keep meaning to check it out... all nice and cross-platform too.

akent
The only issue with Code::Blocks is that it doesn't straightforwardly generate anything resembling Makefiles. Its default behavior is to perform the entire build process itself.
greyfade
+1  A: 

I would prefer Eclipse + CDT.

It uses GCC compatible indexing (parsing of code for auto completion).

P.S.: The request is not that strange. I also use Windows as development platform for Linux (embedded ARM platform) development.

This is very often the case because if you have software for Windows and an embedded device you don't want to bother with an additional PC Linux just for development.

I also use a Cross GCC for compilation but this is not needed to use Eclipse+CDT just for editing.

rstevens
A: 

What I do with my university assignments is use mingw on windows, and just edit my c++ files with a regular text editor, namely notepad++

Seriously man, don't be too dependent on an IDE, you should be able to program with or without one.

hasen j
I just prefer to have code-completion, class listings, and syntax highlighting. It makes my life easer.
St. John Johnson
+1  A: 

I used Visual Studio quite successfully for a non-Windows target. My target wasn't Linux, it was an embedded system - however it had nothing to do with Windows.

It worked very, very nicely (I also had Visual Assist installed, which I think adds a huge amount of value to Visual Studio). I set up a makefile project to perform the build so I could do pretty much everything except debug in Visual Studio.

So if you have a gcc Windows to Linux cross compiler (is there such a thing?) you should be able to set up a makfile that builds the project and probably even deploys it to a target system that you can debug on.

Michael Burr
If you can't find a cross-compiler targeted to Linux pre-built you can just build it yourself... (it's not even that hard if you use MSYS/MINGW...)gcc pretty much lets you target anything it supports from any platform it runs on...
Spudd86
+2  A: 

Eclipse CDT is not only an IDE that works on many platforms, It has also remote features

If you find that the development procedure you outlined is too cumbersome it will allow you to develop natively on Linux without a need to change any of your projects.

You can also use the Remote System Explorer from DSDP/TM to transfer your files as described in your question.

lothar
+1  A: 

Use any IDE that you like. What's important is the compiler, and I would recommend MinGW (it's a Windows port of G++).

Tian Bo
+1  A: 

Eclipse is a good starting point for C++ on any platform. I use Scintilla for basic syntax highlighting personally (SciTE) ... I used Netbeans and that was pretty good. I didn't stick with it long because it (along with Eclipse) is just too slow - I end up just pulling up the editor and using the command line.

As an aside,

Visual Studio is the best IDE in the world for any language. People can hate on Microsoft, but they really know how to treat their developers.

+1 for the Visual Studio comment! I agree with you, Visual Studio does some AMAZING things, but it is certainly not the best for every language.
St. John Johnson