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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Reichenbach

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

    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?
  • BobR

    #2
    Re: Visual Studio for cross platform (windows/linux) developement?


    Michael Reichenbach <Reichenbach@di scardmail.comwr ote 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/


    Comment

    • Michael Reichenbach

      #3
      Re: Visual Studio for cross platform (windows/linux) developement?

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

      But what about the ide from microsoft (vs05)?

      Comment

      • Ian Collins

        #4
        Re: Visual Studio for cross platform (windows/linux) developement?

        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.

        Comment

        • Boris

          #5
          Re: Visual Studio for cross platform (windows/linux) developement?

          On Fri, 25 May 2007 10:01:31 +0900, Michael Reichenbach
          <Reichenbach@di scardmail.comwr ote:
          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

          Comment

          • Zeppe

            #6
            Re: Visual Studio for cross platform (windows/linux) developement?

            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

            Comment

            Working...