NEWBIE QUESTION: Writing Small Program for Linux

Discussion in 'C++' started by John Ryan, Nov 1, 2003.

  1. John Ryan

    John Ryan Guest

    I'm a PHP/MySQL web developer who doesn't have a clue about c++, but I'm
    willing to learn a bit to accomplish a task. I've a copy of Visual studio
    with visual c++, but need to write a quick program to upload to my web
    server to run on linux. Is it easy to convert Visual C++ code into Linux??
     
    John Ryan, Nov 1, 2003
    #1
    1. Advertising

  2. John Ryan

    Aggro Guest

    John Ryan wrote:

    > I'm a PHP/MySQL web developer who doesn't have a clue about c++, but I'm
    > willing to learn a bit to accomplish a task. I've a copy of Visual studio
    > with visual c++, but need to write a quick program to upload to my web
    > server to run on linux. Is it easy to convert Visual C++ code into Linux??


    That depends how much code you have and what you have in it. If it is
    standard C++, then it will compile just like that on Linux. If a lot of
    Windows extensions are used in the code, then it might be a bigger problem.
     
    Aggro, Nov 1, 2003
    #2
    1. Advertising

  3. "John Ryan" <> wrote in message news:<>...

    > I'm a PHP/MySQL web developer who doesn't have a clue about c++, but I'm
    > willing to learn a bit to accomplish a task. I've a copy of Visual studio
    > with visual c++, but need to write a quick program to upload to my web
    > server to run on linux. Is it easy to convert Visual C++ code into Linux??


    Linux programs must be built with a compiler that builds Linux
    programs. Visual C++ is not one of those. The easiest way to do what
    you want is to build the program on Linux using GCC, the GNU Compiler
    Collection, which can compile C++ and several other languages. If it
    is not installed on your Linux system, ask your administrator to
    install it. If you don't have terminal access to the Linux system, you
    may want to look into that, or else install it at home.

    Alternatively, there's something called a "cross compiler" which can
    build programs for a different system than that upon which it runs,
    e.g., a Windows cross-compiler which builds Linux programs. GCC can be
    built as a cross-compiler, but it's not the easiest thing to do, and
    you may in fact find it nigh impossible with your admittedly limited
    experience in this area.

    Finally, note that this newsgroup discusses the ISO C++ language, not
    issues with various C++ compilers, operating systems, or third-party
    packages which happen to be written in C++. Each of these entities has
    its own support venues (newsgroups, mailing lists, etc.) read by those
    most familiar with the topic at hand. Please make sure to direct such
    questions to the appropriate forum.

    - Shane
     
    Shane Beasley, Nov 2, 2003
    #3
  4. John Ryan

    Troll_King Guest

    "John Ryan" <> wrote in message news:<>...
    > I'm a PHP/MySQL web developer who doesn't have a clue about c++, but I'm
    > willing to learn a bit to accomplish a task. I've a copy of Visual studio
    > with visual c++, but need to write a quick program to upload to my web
    > server to run on linux. Is it easy to convert Visual C++ code into Linux??


    No, it's not easy because they are incompatible. Most of that stuff
    will probably be incompatible with even the next Microsoft product -
    Longhorn.
     
    Troll_King, Nov 2, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    353
  2. Michael Goettsche

    Writing a small battleship game server in Python

    Michael Goettsche, Aug 11, 2005, in forum: Python
    Replies:
    0
    Views:
    1,440
    Michael Goettsche
    Aug 11, 2005
  3. Dan
    Replies:
    3
    Views:
    892
    Michael Goettsche
    Aug 12, 2005
  4. Michael Goettsche
    Replies:
    2
    Views:
    916
    Paul Rubin
    Aug 13, 2005
  5. Levi Campbell
    Replies:
    3
    Views:
    278
    Nicol van der Merwe
    Jul 20, 2008
Loading...

Share This Page