By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,208 Members | 1,550 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,208 IT Pros & Developers. It's quick & easy.

Visual Studio for cross platform (windows/linux) developement?

P: n/a
After working with script languages, notepad(++) and co. and several
other ide`s I found something which really improved my productivity
(Visual Studio 2005). It`s imho better then dev-cpp... I worked with C#
and VB.net a bit and it was really easy because of the debugger, the
interactive debugger, intellisense, command completer and so on.

I would like to stick to this ide.

But I thought about to invest in C++ instant of C# / VB.net because .net
is not portable enough (programs can`t compile to native code, them need
always the .net framework and them can`t be written cross platform from
windows to linux because mono is not ready yet). C++ is a bit better in
this case.

My question is, if I decide to use VS05 to write C++... Are I limited to
Windows? Or if I use cross platform frameworks like qt I just need to
recompile under linux?

Or is VS05 C++ incompatible with gcc/qt and so on?

I couldn`t even compile a hello world example for gcc.
(http://www2.latech.edu/~acm/helloworld/c++.html) I guess because VS05
don`t has iostream.h. But if I would add this reference I could use VS05
anyway?

Is there any reason against VS05 for cross platform? What is the most
used ide for cross platform C++? Dev-cpp?
May 25 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a

Michael Reichenbach <Re*********@discardmail.comwrote in message ...
>
I couldn`t even compile a hello world example for gcc.
(http://www2.latech.edu/~acm/helloworld/c++.html) I guess because VS05
don`t has iostream.h.
Because that file does not exist! Try <iostream>!!!!

#include <iostream>

int main(){ using std::cout; // for NG post
cout << "Hello World!" << std::endl;
return 0;
} // main()

[ Use g++, gcc is the GCC 'C' compiler!! ]
--
Bob R
POVrookie
- -
Dev-C++ IDE: http://www.bloodshed.net/
MinGWStudio http://www.parinyasoft.com/ (has GNU/Linux port)
Code::Blocks http://www.codeblocks.org/
May 25 '07 #2

P: n/a
Yeah, it`s working with g++ and dev-cpp (which is using g++ aswell too).

But what about the ide from microsoft (vs05)?
May 25 '07 #3

P: n/a
Michael Reichenbach wrote:
Yeah, it`s working with g++ and dev-cpp (which is using g++ aswell too).

But what about the ide from microsoft (vs05)?
What about it? Please retain the context in the message you are
replying to.

VS is windows only.

--
Ian Collins.
May 25 '07 #4

P: n/a
On Fri, 25 May 2007 10:01:31 +0900, Michael Reichenbach
<Re*********@discardmail.comwrote:
After working with script languages, notepad(++) and co. and several
other ide`s I found something which really improved my productivity
(Visual Studio 2005). It`s imho better then dev-cpp... I worked with C#
and VB.net a bit and it was really easy because of the debugger, the
interactive debugger, intellisense, command completer and so on.

I would like to stick to this ide.

But I thought about to invest in C++ instant of C# / VB.net because .net
is not portable enough (programs can`t compile to native code, them need
always the .net framework and them can`t be written cross platform from
windows to linux because mono is not ready yet). C++ is a bit better in
this case.

My question is, if I decide to use VS05 to write C++... Are I limited to
Windows? Or if I use cross platform frameworks like qt I just need to
recompile under linux?

Or is VS05 C++ incompatible with gcc/qt and so on?
If you (as a developer) don't change the operating system on a daily base
just go ahead with what you prefer (eg. Visual Studio) and write
C++ standard code. If you use third-party libraries you need to check
their documentation to see if they are cross-platform.

Boris
May 25 '07 #5

P: n/a
Michael Reichenbach wrote:
After working with script languages, notepad(++) and co. and several
other ide`s I found something which really improved my productivity
(Visual Studio 2005). It`s imho better then dev-cpp...
Really good choice. Visual studio (even in the free edition, visual c++
express edition) is a professional tool , and it's very very powerful.
You just can't compare it to dev-cpp.
I worked with C#
and VB.net a bit and it was really easy because of the debugger, the
interactive debugger, intellisense, command completer and so on.

I would like to stick to this ide.
Good idea. Everybody should be able to hoose the ide that suits better
to him, in my opinion.
My question is, if I decide to use VS05 to write C++... Are I limited to
Windows? Or if I use cross platform frameworks like qt I just need to
recompile under linux?
Oh, well, visual studio is for windows, in the sense that if you compile
a code, the program will run only under windows (except for emulators).
But, remember, C++ is a standard thing, and both Visual c++ and g++ are
becoming more and more stick to the standard. So, as long as you write
standard code, you are guaranteed that it will compile on both the
compilers. So, feel free to develop under windows, and from time to
time, if the portability is your concern, try to compile your code under
g++ and linux to see if it still works (the best thing would be a test
suite...).

Another thing are the libraries. Not all of them are oprtable. Qt is,
but in the free edition (for non-commercial use) visual c++ is not
supported. Fortunately, you can compile them even if they are not
supported, it's not illegal. But it's a little bit tricky. You can find
tutorials online.
Or is VS05 C++ incompatible with gcc/qt and so on?
see above. It's not, with qt, it may be with other tools.
I couldn`t even compile a hello world example for gcc.
(http://www2.latech.edu/~acm/helloworld/c++.html) I guess because VS05
don`t has iostream.h. But if I would add this reference I could use VS05
anyway?
the headers with the .h ending are obsolete and are being gradually
removed (their usage can lead to errors as well). The c++ headers are
without extension (iostream, vector, map...) and the c header have a c
in front of them (cstdio, cstdlib, cmath...).

Good work!

Regards,

Zeppe
May 25 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.