2

I was reading today question on IDEs fo C++, and there are very good ones like Netbeans.

My question is about creating a software in C++ on Windows Environment, but let users install and run my software also on Linux and OSX.

Does netbeans has a compiler to do the job, or is there any good IDE which has a compiler for targeting my c++ code to these other environments?

thank you

Junior Mayhé
  • 16,144
  • 26
  • 115
  • 161
  • IDE's don't compile code, compilers do. Are you asking for a compiler that can target platforms other than the one it's running on? – GManNickG Feb 16 '10 at 20:16
  • For IDE recommendations, see http://stackoverflow.com/questions/24109/c-ide-for-linux and http://stackoverflow.com/questions/2261917/which-ide-should-one-use-for-c-on-windows and http://stackoverflow.com/questions/579219/best-unix-linux-c-debuger-ide and a bazillion similar questions. Your choice of IDE is only tangentially related to whether your program can be compiled on other platforms, though. – Sinan Ünür Feb 16 '10 at 20:19
  • Vim/Emacs and the autotools? :) – t0mm13b Feb 16 '10 at 20:22

10 Answers10

2

QtCreator. It's awesome, slick and everything.

While it is not as feature rich as some competitors, it does many things just right that others don't.

I would say it is the one truly cross-platform IDE that is competitive to single-platform solutions. And it comes with tight integration of a very powerful and clean cross-platform toolkit. Something that you need for most cross-platform applications by itself.

ypnos
  • 50,202
  • 14
  • 95
  • 141
  • Thank you, I'll take a look! http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html – Junior Mayhé Feb 16 '10 at 20:24
  • Did you have a chance to use also Code::Blocks? – Junior Mayhé Feb 16 '10 at 20:33
  • Yes and I don't like it. The main problem is that it is centered around wxWidgets which has a deprecated API design (basically MFC-alike) and does not work as well as advertised on other platforms. – ypnos Feb 17 '10 at 11:24
2

I use Eclipse CDT and have had some degree of success. But I'm a Java programmer, so it's what I'm used to. It's worth checking out, and the extensions are quite cool.

larley
  • 206
  • 1
  • 4
1

Many people like Code::Blocks and it is cross-platform, with integrated debugging, code completion, etc. Qt Creator is also good and at least still very minimalistic.

Tronic
  • 10,250
  • 2
  • 41
  • 53
0

Without a doubt VisualStudio with gnu make.

Patrick Kafka
  • 9,795
  • 3
  • 29
  • 44
0

I've found Visual Studio to have the best IDE for C++. In addition, it's debugger and the way it handles multi-threaded applications is excellent.

And you can tweak the properties for your project to use different compilers and compiler flags of your choice, so it can build to any target.

Shayan
  • 568
  • 1
  • 5
  • 7
  • Well for most platforms gcc works great, http://gcc.gnu.org/. You can specify the appropriate target flags, and it will compile to that. – Shayan Feb 16 '10 at 20:41
  • Use Msys/mingw on Windows: http://sourceforge.net/projects/mingw/files/ - this is gcc/g++ for Win32. Use gcc/g++ "from" Apple on Mac OSX, use gcc/g++ on linux. –  Feb 16 '10 at 20:47
0

You're talking about cross-compiling as GMan said, that's a compiler job, not IDE's and itu's kind of hard to make C++ software that runs well on Linux/Windows/MacOSX, C++ isn't a cross plataform language beacuse of its ABI, so you should try to use C++ standart code. If you're making a consloe application there's no much problem just be care not to use system interface, but if you're planning to do some kind of graphics app then C++ it not the better choice for your purpose. Try some design that split the view from the controller/model of the app.

Community
  • 1
  • 1
erick2red
  • 1,312
  • 1
  • 14
  • 19
0

You can use QtCreator or NetBeans. First on C++ secord on Java. Both use MinGW g++.

den bardadym
  • 2,747
  • 3
  • 25
  • 27
0

Just a thought: you don't need to use a single IDE for all platforms. It is very common, for example, to use Visual Studio on Windows and Xcode on Mac OS X for cross-platform projects. I'm not familiar with Linux IDEs thought so couldn't recommend anything there.

Frederik Slijkerman
  • 6,471
  • 28
  • 39
0

Write makefiles for each OS? Simple enough seems to me.

Paul Nathan
  • 39,638
  • 28
  • 112
  • 212
0

Concerning cross plattform development it doesn't make a difference which IDE you use. Just make sure you use a cross platform (and possibly IDE independent) build system like SCons or cmake.

mabr
  • 21
  • 2