VS2005 to gcc

Discussion in 'C++' started by nkomli@gmail.com, Jun 20, 2008.

  1. Guest

    Hi, I have a simple C++ source file which works perfectly in Visual
    Studio 2005. Unfortunately I have to get it compiled for use on a
    remote linux machine. Using putty I get a zillion cryptic error
    messages that scroll off the putty screen making it impossible to see
    the first error messages. Is there a way to compile Linux executables
    on Windows or somehow get a more forgiving Linux compiler or a page
    with all the nonos in gcc that are acceptable in VS?
    , Jun 20, 2008
    #1
    1. Advertising

  2. Kai-Uwe Bux Guest

    wrote:

    > Hi, I have a simple C++ source file which works perfectly in Visual
    > Studio 2005. Unfortunately I have to get it compiled for use on a
    > remote linux machine. Using putty I get a zillion cryptic error
    > messages that scroll off the putty screen making it impossible to see
    > the first error messages.


    Hint: Redirect the error messages to a file so that you can read through
    them after the compiler is done.

    > Is there a way to compile Linux executables
    > on Windows


    Don't know. Also: this is off-topic here. You might get better answers in a
    Linux or Windows group.

    > or somehow get a more forgiving Linux compiler or a page
    > with all the nonos in gcc that are acceptable in VS?


    a) Since you get a zillion messages, I venture the conjecture that there are
    libraries missing on the linux box that the program requires. In that case,
    it's not just about making gcc happy.

    b) Specific compiler issues are best addressed on forums dedicated to those
    platforms.


    Best

    Kai-Uwe Bux
    Kai-Uwe Bux, Jun 20, 2008
    #2
    1. Advertising

  3. Adem24 Guest

    "Kai-Uwe Bux" wrote
    > wrote:
    >
    > > Hi, I have a simple C++ source file which works perfectly in Visual
    > > Studio 2005. Unfortunately I have to get it compiled for use on a
    > > remote linux machine. Using putty I get a zillion cryptic error
    > > messages that scroll off the putty screen making it impossible to see
    > > the first error messages.

    >
    > Hint: Redirect the error messages to a file so that you can read through
    > them after the compiler is done.


    The OP is a so called "windows" programmer,
    so you have to tell him what redirection means
    and how it is done since this concept is alien to "windows" programmers.
    Most of them even don't know what a shell is... :)
    This is really no joke! That's what MS makes of these people,
    ie. il stupido to the max.

    > > Is there a way to compile Linux executables
    > > on Windows

    >
    > Don't know. Also: this is off-topic here. You might get better answers in a
    > Linux or Windows group.
    >
    > > or somehow get a more forgiving Linux compiler or a page
    > > with all the nonos in gcc that are acceptable in VS?

    >
    > a) Since you get a zillion messages, I venture the conjecture that there are
    > libraries missing on the linux box that the program requires. In that case,
    > it's not just about making gcc happy.
    >
    > b) Specific compiler issues are best addressed on forums dedicated to those
    > platforms.
    Adem24, Jun 20, 2008
    #3
  4. Jim Langston Guest

    <> wrote in message
    news:...
    > Hi, I have a simple C++ source file which works perfectly in Visual
    > Studio 2005. Unfortunately I have to get it compiled for use on a
    > remote linux machine. Using putty I get a zillion cryptic error
    > messages that scroll off the putty screen making it impossible to see
    > the first error messages


    You can redirect the output to a file.
    > whatevercommadntocompilehere > MyOutput

    then you can look at MyOutput at your leasure.

    >. Is there a way to compile Linux executables
    > on Windows


    Well, DevCPP uses a more linuxesque compiler. You can donload DevCPP for
    free.

    > or somehow get a more forgiving Linux compiler or a page
    > with all the nonos in gcc that are acceptable in VS?
    Jim Langston, Jun 20, 2008
    #4
  5. Eric Johnson Guest

    In addition to what others have suggested, you may want to check out
    cygwin. You can then use g++ on your Windows box, which may be a
    little easier to work with than a remote Linux machine.
    Eric Johnson, Jun 20, 2008
    #5
  6. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    wrote:
    > Hi, I have a simple C++ source file which works perfectly in Visual
    > Studio 2005. Unfortunately I have to get it compiled for use on a
    > remote linux machine. Using putty I get a zillion cryptic error
    > messages that scroll off the putty screen making it impossible to see
    > the first error messages. Is there a way to compile Linux executables
    > on Windows or somehow get a more forgiving Linux compiler or a page
    > with all the nonos in gcc that are acceptable in VS?


    Well duh, it seems people already suggested to redirect the output but
    nobody actually told you how to perform redirection in a Linux shell...
    so here it goes:

    g++ -o foo foo.cpp 1> output.txt 2> error.txt

    The "Standard output" stream (cout) will be in output.txt, the "Standard
    error" (cerr) in error.txt. They are usually mingled to screen output,
    but if you redirect them like this you will see nothing on the screen.

    Usually you can also scroll screen output using Shift+PgUp, but this
    depends on the implementation.

    As for what the errors could be, maybe you are lacking a library:

    g++ -o foo foo.cpp -lmissinglibrary

    If the file is not a trade secret, you can post it here so it will be
    easier for us to see what is wrong with it.

    Cheers,
    - -Federico
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.5 (GNU/Linux)
    Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

    iD8DBQFIZM0OBIpu+y7DlLcRAjOlAKCX1VWUY6f169IS49V3lEf5SCnxxACZAbXr
    262FjhyAmeT7jfHo4JgB0GQ=
    =bkoT
    -----END PGP SIGNATURE-----
    Federico Zenith, Jun 27, 2008
    #6
    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:
    8
    Views:
    419
  2. Kevin P. Fleming

    C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1

    Kevin P. Fleming, Nov 6, 2003, in forum: C Programming
    Replies:
    2
    Views:
    635
    Kevin P. Fleming
    Nov 6, 2003
  3. Replies:
    5
    Views:
    353
    Nathan Addy
    Sep 17, 2005
  4. ashnin

    GCC 3.4.3 and GCC 4.1.2

    ashnin, Jul 7, 2008, in forum: C++
    Replies:
    1
    Views:
    505
    Michael DOUBEZ
    Jul 7, 2008
  5. kas
    Replies:
    1
    Views:
    311
    red floyd
    Apr 22, 2010
Loading...

Share This Page